Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic tooltip for the grid's column?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01026385
Message ID:
01026406
Vues:
14
>Hi everybody,
>
>I guess, there is no way to achieve the listbox functionality when you move your mouse over an object, it displays the whole item in the tooltip, if there is not enough room.
>
>I'd like to replicate the same behavior in the grid. The tooltip is shown correctly for the active cell (I use grid's textbox MouseEnter/Leave events), but doesn't work when you mouve mouse over.
>
>Anyone was able to made it work? e.g. evaluate(column.ControlSource)
>
>Thanks.


Nadya,

Create a new class based on TextBox, for example DTTTextBox (DynamicToolTipTextBox) and create an access method for the ToolTip property, then use this new class in your grid, instead of the regular TextBox, and this does the trick

Your ToolTipText_Access method should look like this:
DEFINE CLASS dtttextbox AS textbox


	Height = 23
	Width = 100
	*-- XML Metadata for customizable properties
	_memberdata = ""
	Name = "dtttextbox"


	PROCEDURE tooltiptext_access
		RETURN Iif(Empty(THIS.ControlSource), this.ToolTipText, Alltrim(Transform(Evaluate(THIS.ControlSource))))
	ENDPROC


ENDDEFINE
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform