Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resize in Grid triggers header click
Message
 
 
To
06/12/2004 11:42:12
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00967240
Message ID:
00967254
Views:
16
This message has been marked as a message which has helped to the initial question of the thread.
>When a resize event occurs in cgrid, it triggers the header click event, thus changing the index.. is there a way to stop this??
>
>Thanks,
>Dan

Hi Dan.

I have the following properties of grid's header class:

mlColumnMoved = .f. && flag indicating column was moved
mnColumnOrder = 0 && original column order
mlColumnSized = .f. && flag indicating column was resized
mnColumnWidth = 0 && original size of column

In the Click method I check condition if ! .mlColumnMoved and ! .mlColumnSized

And I have this code in MouseDown and MouseUp events:

-------------
procedure mousedown
	lparameters nButton, nShift, nXCoord, nYCoord
	with this

* initialize items that will be tested in MouseUp
		.mnColumnOrder = this.parent.columnorder
		.mnColumnWidth = this.parent.width
	endwith
endproc

	procedure mouseup
	lparameters nButton, nShift, nXCoord, nYCoord

	with this
* check to see if this was a resize or move
		.mlColumnMoved = ( this.parent.columnorder != .mnColumnOrder )
		.mlColumnSized = ( this.parent.width != .mnColumnWidth )
	endwith
endproc
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform