xbrowse old version (2015) oCol:bToolTip

Post Reply
User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

xbrowse old version (2015) oCol:bToolTip

Post by MarcoBoschi »

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: Select all

   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
User avatar
Marc Venken
Posts: 727
Joined: Tue Jun 14, 2016 7:51 am

Re: xbrowse old version (2015) oCol:bToolTip

Post by Marc Venken »

Maybe here is something that can help...

Code: Select all


      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: Select all


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 20.08 with Harbour
User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: xbrowse old version (2015) oCol:bToolTip

Post by MarcoBoschi »

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
Post Reply