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 RUN
// 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