xbrowse old version (2015) oCol:bToolTip

xbrowse old version (2015) oCol:bToolTip

Postby MarcoBoschi » Mon Jun 15, 2020 8: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: Select all  Expand view
  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
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: xbrowse old version (2015) oCol:bToolTip

Postby Marc Venken » Mon Jun 15, 2020 11:04 am

Maybe here is something that can help...

Code: Select all  Expand view


      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  Expand view


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.04 with Harbour
User avatar
Marc Venken
 
Posts: 1429
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: xbrowse old version (2015) oCol:bToolTip

Postby MarcoBoschi » 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
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 114 guests