>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
_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