Page 1 of 1

xbrowse old version (2015) oCol:bToolTip

Posted: Mon Jun 15, 2020 8:14 am
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

Re: xbrowse old version (2015) oCol:bToolTip

Posted: Mon Jun 15, 2020 11:04 am
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


 

Re: xbrowse old version (2015) oCol:bToolTip

Posted: Mon Jun 15, 2020 12:07 pm
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