Malcolm,
If you look in my Organizer project www.replacement-software.co.uk/blog I
use the tooltips to display the entry in a field when the mouse passes over
it (within the grid) in the same way as the Memo tooltip works. I did it
this way and you can change the actual tooltip used according to your needs:

Hope this helps.

Within the Gridhit() Event of the grid:

* As we scan down the grid with the MouseMove we action this routine
* if we are in column a particular column then set the tooltip to be the
full description
* of the event and display it
*
LPARAMETERS nButton, nShift, nXCoord, nYCoord
Local nXCoord_In, nYCoord_In, nWhere_Out, nRelRow_Out, nRelCol_Out,
nView_Out
Local cMessage
Local cTooltip, cCursor

nXCoord_In=nxCoOrd
nYCoord_In=nyCoOrd
nWhere_Out=0
nRelRow_Out=0
nRelCol_Out=0
nView_Out=0

* Only Set up the tooltip if we are in column 1
With This.grdData
  * See where we are in the grid
  .GridHitTest(nxCoord_In, nYCoord_In,@nWhere_Out,@nRelRow_Out,
@nRelCol_Out, @nView_Out)

  * Display full tooltip if we are in column 1, 2 or 3
  If InList(nRelCol_Out,1,2,3)                  
    .ActivateCell(nRelRow_Out,nRelCol_Out)
                
    cCursor=This.cEvent_Cursor
                
     * The next instruction is the equivalent of:
Iif(Empty(X),Alltrim(Y),Alltrim(X)+chr(13)+Alltrim(Y))
    cTooltip=Evaluate("Iif(Empty("+cCursor+".Static_Info"+"),Alltrim(" ;
              +cCursor+".Description"+"),Alltrim("+cCursor+".Static_Info" ;
              +")+Chr(13)+Alltrim("+cCursor+".Description"+"))")
    .Columns[1].Tooltiptext=(cTooltip)
    .Columns[2].Tooltiptext=(cTooltip)
    .Columns[3].Tooltiptext=(cTooltip)
  Endif
  *
Endwith
*
Return



Dave Crozier
 The secret to staying young is to live honestly, eat slowly, and to lie
about your age 

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Malcolm Greene
Sent: 19 October 2006 17:56
To: [email protected]
Subject: Showing cell specific tooltips in a grid and multi-column listbox?

What technique do you recommend for showing cell specific tooltips in a grid
or multi-column listbox?

Thanks,
Malcolm


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to