FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour show tooltip on btnbmp
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
show tooltip on btnbmp
Posted: Sat Jun 23, 2018 10:06 AM

I made a plan of the beach with btnbmp
I show the beach in a window created with the btnbmp controls.
Depending on the day / date range, different types of btnbmp are displayed
when the operator wants to search for a customer, he inserts the name and surname to be searched for in a high place on the explorer class
the procedure must show the name and surname of the customer with a tooltip when the operator performs a search of the client (for that day or for that period already displayed)
how can I display this tooltip without the operator moving the mouse on every btnbmp?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: show tooltip on btnbmp
Posted: Mon Jun 25, 2018 07:58 AM

Silvio,

oBtn:ShowTooltip()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: show tooltip on btnbmp
Posted: Mon Jun 25, 2018 11:55 AM

yes of Course
but perhaps I not explain good
the final user searche for the client's first and last name

I have 200 btnbmp the beach umbrellas

I want to display the tooltip at the same time in all the btnbmp

It is possible that in the archive there are many customers who are called with the same name and are in different umbrellas

so if the user is looking for the opening procedure he must display the tooltip in all the buttons at the same time

so on the video the operator can see where the customer x is located

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: show tooltip on btnbmp
Posted: Wed Jun 27, 2018 05:34 PM

BUT not run I cannot see the tooltip

For n= 1 to 4
@ nRow, nCol BTNBMP aBtn[ n ] RESOURCE GiveBmp(nStatus) ;
SIZE OMB_W,OMB_H PIXEL OF oDlg ;
FLAT TOP COLOR CLR_WHITE NOBORDER ;
TOOLTIP cPosNome

next

ACTIVATE DIALOG oDlg CENTERED ;
on init Mostra(aBtn)
RETURN NIL

Function Mostra(aBtn)
for n= 1 to 4
aBtn[n]:showtooltip()
next
return nil

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: show tooltip on btnbmp
Posted: Mon Jul 02, 2018 10:27 AM

any solution please ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: show tooltip on btnbmp
Posted: Wed Jul 04, 2018 04:20 AM

To the best of my understanding, only one tooltip can be shown at a time.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: show tooltip on btnbmp
Posted: Wed Jul 04, 2018 05:18 AM
nageswaragunupudi wrote:To the best of my understanding, only one tooltip can be shown at a time.


Hi Mr. Rao,

Is it possible to set duration of tooltip showtime?
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: show tooltip on btnbmp
Posted: Wed Jul 04, 2018 08:18 AM
Is it possible to set duration of tooltip showtime?


Yes.
Assign an array to cToolTip

cToolTip := { cToolTipText, [cHeader], [Icon], [nClrFore], [nClrBack], [nWidth], [nDelayInSeconds] }

Note: Color settings do not seem to work in Windows 10
Regards



G. N. Rao.

Hyderabad, India
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: show tooltip on btnbmp
Posted: Wed Jul 04, 2018 05:23 PM
Mr Rao,
I cannot show the tooltip on the btnbmp I wish ( without mouse over)

I explain you
I have a dialog with many btnbmp I use to show Umbrellas of a beach
When I search on customer I must show the tooltip on umbrellas where is the customer 

I use reserva.dbf Of Tplan sample : the roomID is the number of Umbrellas ( btnbmp) I show into this dialog

1 . search on reserva.dbf   -> check_in and check_out  date past and  name of customer 
2. if found it I have the number of umbrellas ( roomID)
3 the procedure must show a tooltip on btnbmp

here there is a test ( I sent to Antonio last week)
Code (fw): Select all Collapse
// search a customer into Beach

REQUEST DBFCDX
REQUEST DBFFPT
EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO


#define OMB_W  30
#define OMB_H  30

Function Test()
Local oDlg,oFont
   Local nBottom   := 28.4
   Local nRight    := 77.7
   local nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   local nHeight := nBottom * DLG_CHARPIX_H


   local nOmbrelloni := 10 // Total number of Umbrellas
   Local aBtn[ nOmbrelloni ] // number of Umbrellas

 RDDSetDefault( 'DBFCDX' )
  DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14

 DEFINE DIALOG oDlg SIZE nWidth, nHeight PIXEL;
 FONT oFont    Title "Searching a customer"

 nRow  := 60
 nCol  := 10

 FOR n= 1 to nOmbrelloni
 @ nRow, nCol BTNBMP aBtn[ n ] RESOURCE "c:\work\fwh\bitmaps\alphabmp\world.bmp" ; //PROMPT LTrim( Str( n ) ) + " " ;
      SIZE OMB_W,OMB_H PIXEL OF oDlg ;
      FLAT TOP COLOR CLR_WHITE,CLR_GREEN NOBORDER ;
      TOOLTIP "Umbrella:"+Ltrim(str(n))
    nCol  += OMB_W

   next

   Activate Dialog oDlg Centered ;
   on init Searching(aBtn)

RETURN NIL

//------------------------------------------------//

Function Searching(oControl)
  // After the search I found the customer
  // the customer is on umbrella  number 4
 // now I must show the tooltip on this button

   Local searched:= 4
   Local cCustomer:="Antonio Linares"
   oControl[4]:showtooltip(,,cCustomer)
   oControl[4]:refresh()

RETURN NIL
//------------------------------------------------//
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: show tooltip on btnbmp
Posted: Thu Jul 05, 2018 12:04 PM
nageswaragunupudi wrote:
Is it possible to set duration of tooltip showtime?


Yes.
Assign an array to cToolTip

cToolTip := { cToolTipText, [cHeader], [Icon], [nClrFore], [nClrBack], [nWidth], [nDelayInSeconds] }

Note: Color settings do not seem to work in Windows 10



Code (fw): Select all Collapse
  oBrw:bToolTips   := ;
         { | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }



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 )


Hi Mr. Rao,

How can I adapt it to xbrowse bToolTip?
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: show tooltip on btnbmp
Posted: Thu Jul 05, 2018 03:35 PM
Please stop using bToolTip. This requires very complex code and now it is obsolete.

Instead use, bCellTooltip

Code (fw): Select all Collapse
oBrw:bCellToolTips := { |oMouseCol| oMouseCol:StrData }
Regards



G. N. Rao.

Hyderabad, India
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: show tooltip on btnbmp
Posted: Thu Jul 05, 2018 03:38 PM
nageswaragunupudi wrote:To the best of my understanding, only one tooltip can be shown at a time.



Can I show the tooltip of one btnbmp without move the mouse over ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: show tooltip on btnbmp
Posted: Thu Jul 05, 2018 05:29 PM
nageswaragunupudi wrote:Please stop using bToolTip. This requires very complex code and now it is obsolete.

Instead use, bCellTooltip

Code (fw): Select all Collapse
oBrw:bCellToolTips := { |oMouseCol| oMouseCol:StrData }


Is it possible to set showtime in bCellToolTips?
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: show tooltip on btnbmp
Posted: Thu Jul 05, 2018 05:55 PM
Sorry Horizon

but the topic is another

I asked tooltip on btnbmp and the possibility to show it on btnbmp without mouse over on btnbmp

Please, if you wish ask another your problem add a new topic thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion