xbrowse and tooltip

xbrowse and tooltip

Postby damianodec » Wed Nov 22, 2023 3:39 pm

hi,
In my xbrowse I have a tooltip
Code: Select all  Expand view  RUN

WITH OBJECT oBrw:aCols[ 15 ]
    :bCellToolTip := { |oCol| "My ToolTip" }   
end
 

I would like there to be a sign in those cells or column with tooltips like excel with comment (see example below):
Image
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 422
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: xbrowse and tooltip

Postby karinha » Wed Nov 22, 2023 4:03 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7872
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: xbrowse and tooltip

Postby karinha » Wed Nov 22, 2023 4:08 pm

// C:\FWH\SAMPLES\TOOLTCOL.PRG

Code: Select all  Expand view  RUN

#include "FiveWin.ch"

function TestTip()

   LOCAL oDlg, oFont, oBrw
   LOCAL nMilliSeconds := 32767


   USE CUSTOMER

   DEFINE DIALOG oDlg SIZE 600,500 PIXEL

   @ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" AUTOCOLS ;
      CELL LINES NOBORDER

   /*
   oBrw:bToolTips   := ;
         { | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }
   */


   oBrw:bCellToolTips := { |o| o:Value } // yes

   // oBrw:bCellToolTips := { |o| { o:Value, nil, nil, nil, nil, nil, nMilliSeconds } }  // yes

   // { uToolTip, cTitle, choIcon, clrFore, clrBack, nWidth, nDelayTime}

   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED

return nil

//----------------------------------------------------------
Function MyColToolTip( oBrw, r, c, f, oMouseCol, nMouseRow )

   local uBm, uVal

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

return cValToChar( uVal )
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7872
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: xbrowse and tooltip

Postby damianodec » Fri Nov 24, 2023 7:51 am

hi karinha
what I would like is the dot red in the cell with tooltip.
My xbowse has 35 column and tooltip could be in 1 or 3 or 10 or 15 column (it's a random)
when the users open xbrowse he doesn't know where the tooltip is.
the excel example (dot red into the of C column) could be a solution.

thanks
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 422
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: xbrowse and tooltip

Postby Marc Venken » Fri Nov 24, 2023 8:22 am

The Red dot would be a extra element into the cell.... Mr. Rao will know the possibilities.

But this is also a option.

1 Coloring the cell like in this post : viewtopic.php?f=3&t=40217&hilit=cellborder

I didn't look the tread, but I would look into it. Maybe the colored box can be changed in layout like you would.

2 If the browse is not to big, create 1 png with the data of the cell and combine a transparent png with the red dot in upper right. Use this pics to browse, but it will slow down stuff (just a idea)

With option 1 your customer will see cellborders changed when tooltip data is there.

Just a idea )))
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1456
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: xbrowse and tooltip

Postby Natter » Sat Nov 25, 2023 7:17 pm

You can combine text and an image in a cell.
Code: Select all  Expand view  RUN
:aCols[1]:bStrData:={||}
 :aCols[1]:nDataBmpAlign:=AL_RIGHT
 :aCols[1]:bBmpData{||}
Natter
 
Posts: 1226
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 87 guests