Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic tooltip for the grid's column?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01026385
Message ID:
01026406
Views:
15
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform