Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ToolTipText in grid?????

Status
Not open for further replies.

bon011

Programmer
Jun 2, 2002
155
CZ
Hi all,

how to show ToolTipText in grid.
Every record has text filed that contain text that I wont to show when user move mouse on record in a grid.

I have set MyForm.ShowTips=.t.

 
bon011

Take a look at faq184-3064.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Bon011,

Chris's code (in FAQ184-3064) should work well, but one thing which it won't do is to let you vary the tooltip according to the data in the record.

In other words, if you want the tip to show the contents of a field in the table to which the grid is bound, that won't work. That's because you cannot address the individual rows of the grid, and so there is no way of knowing which record the mouse is on.

At least, that was I believe. If I am wrong, Chris (or someone else) please correct me.

Mike


Mike Lewis
Edinburgh, Scotland
 
Theoretically, if one was to maintain an array of the currently displayed records, and keep pointers corresponding to AfterRowColChange events, then one could keep track somewhat of the current location in the table of the records being displayed.
With that, one could maybe use the grid coordinates along with the RowHeight and RelativeRow properties in the MouseMove event to calculate which cell the mouse is over, throw all that data at a form method which would return an array element's value to the ToolTip property.

Sounds like a Goldberg machine as well as a headache.


-Dave S.-
[cheers]
Even more Fox stuff at:
 
MikeLewis,

You was right. But I done it. I used afterrowcolcahange event and remember record that is selected. I store records tooltiptext in new property. Then I show the new property.

But cell must be focused.

Thats only way I can do that. I think.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top