Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Move grid column without firing header's click()
Message
From
22/06/2005 10:02:39
 
 
To
22/06/2005 09:40:43
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01025428
Message ID:
01025445
Views:
25
>Hi,
>
>I have a VFP grid on a form. In the grid's columns' headers' click() event, there is code to sort that column (ascending/descending). One side effect is that when I move a column by dragging and dropping it to the new position, the sort is also fired.
>
>Anyone have suggestions as to how to avoid the sorting after moving the column?
>
>TIA
>
>Mike

Mike,

Another possibility
&& add these properties to the header
	_nXCoord = 0
	_nYCoord = 0

&& in the mousedown()
this._nXCoord	= m.nXCoord
this._nYCoord	= m.nYCoord


&& in the mouseup()
#define _NOT_MOVED	(	;
				( m.nXCoord == m.this._nXCoord ) ;
			and	( m.nYCoord == m.this._nYCoord ) ;
			)

do case
case  _NOT_MOVED
    && do your thing

endcase
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform