Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid and RowHeight
Message
De
10/09/2002 04:57:13
 
 
À
10/09/2002 04:13:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00698657
Message ID:
00698666
Vues:
20
This message has been marked as the solution to the initial question of the thread.
>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
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform