Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resize in Grid triggers header click
Message
 
 
À
06/12/2004 11:42:12
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00967240
Message ID:
00967254
Vues:
8
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform