All,
Is there any way to show a tooltip when the mouse is over a particular cell?
Thanks,
Randal
Antonio Linares wrote:Randal,
With xbrowse, you can set a tooltip for each column, but it will be shown when the mouse is over the column header.
Are you looking to show a tooltip when the mouse is over a cell ?
oBrw:ShowToolTip( nRow, nCol, cToolTipText) could be used
nFor := If( nRow < ::HeaderHeight(), ::MouseColPos( nCol ), 0 )
if nFor > 0 .and. nFor <= nLen
oCol := ::ColAtPos( nFor )
CursorArrow()
if Empty( oCol:cToolTip )
::DestroyToolTip()
else
if ::oColToolTip == nil .or. ::oColToolTip:nCreationOrder != oCol:nCreationOrder
::DestroyToolTip()
::ShowToolTip( ,, oCol:cToolTip )
::oColToolTip := oCol
endif
endif
return 0
else
if ::oColToolTip != nil
::DestroyToolTip()
endif
::CheckToolTip()
endif
nFor := If( nRow < ::HeaderHeight(), ::MouseColPos( nCol ), 0 )
if nFor > 0 .and. nFor <= nLen
oCol := ::ColAtPos( nFor )
CursorArrow()
if Empty( oCol:cToolTip )
::DestroyToolTip()
else
if ::oColToolTip == nil .or. ::oColToolTip:nCreationOrder != oCol:nCreationOrder
::DestroyToolTip()
::ShowToolTip( nRow,nCol, oCol:cToolTip )
::oColToolTip := oCol
endif
endif
return 0
elseif ( nFor := If( nRow > ::HeaderHeight(), ::MouseColPos( nCol ), 0 ) ) > 0
if nFor > 0 .and. nFor <= nLen
oCol := ::ColAtPos( ::MouseColPos( nCol ) )
CursorArrow()
if ::MouseColPos( nCol ) > 0
if Empty( oCol:bToolTip )
::DestroyToolTip()
else
if ::oColToolTip == nil .or. ::oColToolTip:nCreationOrder != oCol:nCreationOrder
cTxt := eval( oCol:bToolTip, Self )
if !empty( cTxt )
::DestroyToolTip()
::ShowToolTip( nRow,nCol, cTxt )
::oColToolTip := oCol
endif
endif
endif
endif
return 0
endif
else
if ::oColToolTip != nil
::DestroyToolTip()
endif
::CheckToolTip()
endif
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 16 guests