FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse old version (2015) oCol:bToolTip
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
xbrowse old version (2015) oCol:bToolTip
Posted: Mon Jun 15, 2020 08:14 AM
Hi,
I have to solve a problem using and old version of xbrowse (2015)

Is it possible to modify this code in order to activate tooltip only if the cell has focus?

Code (fw): Select all Collapse
   oCol:bToolTip      := { || If( oBrw:nArrayAt <= Len( aIncident[ 1 ] ), aIncident[ 1 , oBrw:nArrayAt ], "" ) }


because the tooltip that appears is not related to the selected cell
Another solution accetped since there is an active timer (2/3 seconds), automatically select the cell where the mouse pointer is located

Many thanks
Marco
Marco Boschi
info@marcoboschi.it
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: xbrowse old version (2015) oCol:bToolTip
Posted: Mon Jun 15, 2020 11:04 AM
Maybe here is something that can help...

Code (fw): Select all Collapse
      oBrw:kleur:bToolTip :=  { | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }
      oBrw:memotxt:bToolTip :=  { | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }

// other

      oBrw4:bToolTips   := { | oBrw4,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw4,r,c,f,oMouseCol,nMouseRow ) }


Code (fw): Select all Collapse
function MyColToolTip( oBrwS, r, c, f, oMouseCol, nMouseRow )
   local uBm, uVal

   //xbrowse(oBrwS)


   if nMouseRow != oBrwS:nRowSel
      uBm   := oBrwS:BookMark
      Eval( oBrwS:bSkip, nMouseRow - oBrwS:nRowSel )
      uVal  := oMouseCol:Value
      oBrwS:BookMark := uBm
   else
      uVal  := oMouseCol:Value
   endif

   uVal     := cValToChar( uVal )
   uVal     := StrTran( uVal, "<br>", CRLF )
   uVal     := StrTran( uVal, "<BR>", CRLF )
   uVal     := StrTran( uVal, ",", CRLF )

return uVal
Marc Venken

Using: FWH 23.08 with Harbour
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: xbrowse old version (2015) oCol:bToolTip
Posted: Mon Jun 15, 2020 12:07 PM
ThankYou Mark
I hope this works out
oCol:bToolTip      := { |oBrw,nRow,nCol| If( oBrw:nArrayAt <= Len( aIncident[ 1 ] ), aIncident[ 1 , oBrw:MouseRowPos( nRow ) ], "" ) }

many thanks
Marco Boschi
info@marcoboschi.it

Continue the discussion