FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse and tooltip
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
xbrowse and tooltip
Posted: Wed Nov 22, 2023 03:39 PM
hi,
In my xbrowse I have a tooltip
Code (fw): Select all Collapse
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):
FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: xbrowse and tooltip
Posted: Wed Nov 22, 2023 04:03 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: xbrowse and tooltip
Posted: Wed Nov 22, 2023 04:08 PM
// C:\FWH\SAMPLES\TOOLTCOL.PRG
Code (fw): Select all Collapse
#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
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Re: xbrowse and tooltip
Posted: Fri Nov 24, 2023 07: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 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: xbrowse and tooltip
Posted: Fri Nov 24, 2023 08: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 : https://forums.fivetechsupport.com/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.08 with Harbour
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: xbrowse and tooltip
Posted: Sat Nov 25, 2023 07:17 PM
You can combine text and an image in a cell.
Code (fw): Select all Collapse
:aCols[1]:bStrData:={||}
 :aCols[1]:nDataBmpAlign:=AL_RIGHT 
 :aCols[1]:bBmpData{||}

Continue the discussion