show tooltip on btnbmp

show tooltip on btnbmp

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: show tooltip on btnbmp

Postby Antonio Linares » Mon Jun 25, 2018 7:58 am

Silvio,

oBtn:ShowTooltip()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: show tooltip on btnbmp

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: show tooltip on btnbmp

Postby Silvio.Falconi » Wed Jun 27, 2018 5: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: show tooltip on btnbmp

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: show tooltip on btnbmp

Postby nageswaragunupudi » Wed Jul 04, 2018 4:20 am

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: show tooltip on btnbmp

Postby Horizon » Wed Jul 04, 2018 5: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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: show tooltip on btnbmp

Postby nageswaragunupudi » Wed Jul 04, 2018 8: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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: show tooltip on btnbmp

Postby Silvio.Falconi » Wed Jul 04, 2018 5: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: Select all  Expand view
// 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: show tooltip on btnbmp

Postby Horizon » 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: Select all  Expand view
 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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: show tooltip on btnbmp

Postby nageswaragunupudi » Thu Jul 05, 2018 3:35 pm

Please stop using bToolTip. This requires very complex code and now it is obsolete.

Instead use, bCellTooltip

Code: Select all  Expand view

oBrw:bCellToolTips := { |oMouseCol| oMouseCol:StrData }
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: show tooltip on btnbmp

Postby Silvio.Falconi » Thu Jul 05, 2018 3: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: show tooltip on btnbmp

Postby Horizon » Thu Jul 05, 2018 5:29 pm

nageswaragunupudi wrote:Please stop using bToolTip. This requires very complex code and now it is obsolete.

Instead use, bCellTooltip

Code: Select all  Expand view

oBrw:bCellToolTips := { |oMouseCol| oMouseCol:StrData }
 


Is it possible to set showtime in bCellToolTips?
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: show tooltip on btnbmp

Postby Silvio.Falconi » Thu Jul 05, 2018 5: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 111 guests

cron