Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Active Row or Cell MouseEnter
Message
De
11/12/2008 19:33:56
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01366646
Message ID:
01366784
Vues:
10
>>>>>>Is there a way to trigger an event when the mouse is over a particular row or cell in a grid?
>>>>>
>>>>>See RAISEEVENT() function.
>>>>
>>>>Sorry, I must be tired today, but I didn't see how that really helped me.
>>>>
>>>>I'm using BindEvents to tie a grid's MouseEnter to a method in a custom class - that works well finally - but now instead of just the general MyGrid.MouseEnter, I want to bind to something like MyGrid.ActiveRow.MouseEnter, but it does not exist. How can I get my custom class method to fire when the mouse is over either the active row or a cell in the active row of a grid?
>>>
>>>In your base grid class you may have something like
>>>
>>>
>>>for each loColumn in this.columns
>>>	loColumn.addproperty("cOriginalControlSource", m.loColumn.controlsource)	
>>>	loColumn.addproperty("nOriginalWidth", m.loColumn.width)
>>>	
>>>	for each loControl in m.loColumn.controls
>>>		if upper(m.loControl.baseclass) = "HEADER"
>>>			loControl.FontSize = 8
>>>			bindevent(m.loControl,"Click",this,"HeaderClick")
>>>			loControl.addproperty("CurrentTag","") && Adds CurrentTag property
>>>			if this.lCreateIndexes && Adds indexes on the fly
>>>				this.CreateTag (m.loControl)
>>>			endif
>>>		else
>>>			if upper(m.loControl.baseclass) = "TEXTBOX"
>>>				bindevent(m.loControl,"DblClick",this,"DblClick")
>>>			endif
>>>		endif
>>>	endfor
>>>endfor
>>>
>>
>>I need to do this without adding code to the grid, base or otherwise. The grid cannot know about the custom class.
>
>You don't have to do this in the grid if you don't want it. Grab a reference to your grid
>
>loGrid = getpem(..) && or evaluate
>
>with loColumn in loGrid.Columns
>
>  The code I already posted
>ENDWITH
That still isn't helping me. I'll try stating it more simply. I need to know when I am over the active row or a column in the active row of MyGrid. When the mouse is over that area, then I need to run a method in my custom control. I already have BindEvents working to run a method of my custom class when the MyGrid.MouseEnter happens, but I need it to act when the mouse is over the active row of the grid. I'm not sure how what you showed me helps.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform