nageswaragunupudi wrote:To the best of my understanding, only one tooltip can be shown at a time.
Is it possible to set duration of tooltip showtime?
// 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
//------------------------------------------------//
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
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 )
oBrw:bCellToolTips := { |oMouseCol| oMouseCol:StrData }
nageswaragunupudi wrote:To the best of my understanding, only one tooltip can be shown at a time.
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 }
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 94 guests