Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid and RowHeight
Message
 
 
À
10/09/2002 04:57:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00698657
Message ID:
00698675
Vues:
18
This message has been marked as a message which has helped to the initial question of the thread.
Hi!

I think it is not needed to use GridHitTest(). Just store original RowHeight in MouseDown in the property, then check if RowHeight is changed in the Moouse Up. All the rest is extra.
&&Grid.MouseDown
LPARAMETERS nButton, nShift, nXCoord, nYCoord

this.RowHeightOld = this.RowHeight
&& grid.MouseUp
LPARAMETERS nButton, nShift, nXCoord, nYCoord

if( this.RowHeightOld <> this.RowHeight )
       && <b> the row height has changed</b>
endif
Also, if your grid is not a class, you can add custom property (RowHeightOld) to it in run-time by using AddProperty method in the Init event.


>>Hi
>>
>>What events fire when user change RowHeigth , in grid ?
>>
>>I use VFP 6 .
>>
>>Thanks
>
>Pedro,
>
>As far as I know you will have to use the mousedown() and MouseUp() events and check whether the rowheight has changed in between
>
>I have not tested this. Just took some of my code. With this scheme you can fine-tune the mouse clicks
>Add two properties to your grid class: MouseDownGridHitTest and RowHeightOld
>
>&&Grid.MouseDown
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>
>local xx
>=this.GridHitTest(nXCoord, nYCoord, @xx)
>this.MouseDownGridHitTest = xx
>
>do case
>case nShift == 0
>	do case
>	case nButton == BUTTON_LEFT
>		do case
>		case xx = 5	&& Splitbar
>		
>		case xx = 11 && box in upper left corner
>						
>		case xx = 12 && record marker
>		
>		case xx = 13 && Column header sizing area
>		
>		case xx = 14 && Row sizing area
>
>                     this.RowHeightOld = this.RowHeight
>		
>		case xx = 16 && Horizontal scrollbar
>
>		case xx = 17 && Vertical scrollbar
>			
>		endcase
>		
>	case nButton == BUTTON_MIDDLE
>
>	case nButton == BUTTON_RIGHT
>
>        endcase
>endcase
>
>
>
>&& grid.MouseUp
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>
>if( empty(this.MouseDownGridHitTest) )	&& did not pass MouseDown
>	this.MouseDownGridHitTest = 0 && in case == FALSE
>endif
>do case
>case nShift == 0
>	do case
>	case nButton == BUTTON_LEFT
>		do case
>		case this.MouseDownGridHitTest = 5	&& Splitbar
>			
>		case this.MouseDownGridHitTest = 11 && box in upper left corner
>		
>		case this.MouseDownGridHitTest = 12 && record marker
>			
>		case this.MouseDownGridHitTest = 13 && Column header sizing area
>			
>		case this.MouseDownGridHitTest = 14 && Row sizing area
>			if( this.RowHeightOld <> this.RowHeight )
>                             && <b> the row height has changed</b>
>                        endif
>		case this.MouseDownGridHitTest = 16 && Horizontal scrollbar
>		
>		case this.MouseDownGridHitTest = 17 && Vertical scrollbar
>			
>		endcase
>	
>	case nButton == BUTTON_MIDDLE
>
>	case nButton == BUTTON_RIGHT
>
>        endcase
>endcase
>
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform