c5Tooltip+btnbmp on a dialog
Posted: Sun May 05, 2019 8:51 pm
I need to show many Informaton and I need c5Tooltip but there is a problem
I tried with this code but when I move the mouse to another btnbmp it create a new tooltip without delete that first created ( see the picture under)
this test create 7 btnbmp , you can try to move the mouse and it show the tooltip it make the error I post under ... the same test with window make not error why ?
How I can resolve ?
and this is the error
I search on this forum but I not found a solution for this error
I tried with this code but when I move the mouse to another btnbmp it create a new tooltip without delete that first created ( see the picture under)
this test create 7 btnbmp , you can try to move the mouse and it show the tooltip it make the error I post under ... the same test with window make not error why ?
How I can resolve ?
Code: Select all
#include"fivewin.ch"
function TestCurrent()
local oDlg, oFont, oBtn, aBtn[ 7 ]
local nRow, nCol, n
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 600,200 PIXEL TRUEPIXEL FONT oFont
nRow := 50
nCol := 30
for n := 1 to 7
@ nRow, nCol BTNBMP aBtn[ n ] RESOURCE "c:\fwh\bitmaps\alphabmp\world.bmp" ;
SIZE 64,64 PIXEL OF oDlg FLAT TOP COLOR CLR_WHITE,CLR_GREEN NOBORDER
WITH OBJECT ( oBtn := aBtn[ n ] )
:Cargo := n
:bAction := { |oBtn| oBtn:Toggle() }
:bClrGrad := { |l,oBtn| If( oBtn:lPressed, CLR_HRED, CLR_GREEN ) }
:cTooltip := { |oBtn| HazC5ToolTip( oBtn ,oDlg)}
END
nCol += 80
next n
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
//------------------------------------------------------------------------------------------------------------//
Function HazC5ToolTip( oCtrl ,oDlg)
Local oTip
//New( nTop, nLeft, nWidth, nHeight, oWnd, lDisenio, nClrPane, nClrPane2, nClrText, nWRadio, nHRadio ) CLASS TC5ToolTip
oTip := TC5ToolTip():New( 0,0 , 200, 150, oDlg, , CLR_HGRAY, CLR_HGRAY, CLR_BLUE, 0 , 0 )
oTip:nTimer := -1 //15000
oTip:lLineHeader := .T.
oTip:cHeader := "Header"
oTip:cBmpHeader := "..\bitmaps\16edit.bmp"
oTip:cHeader2 := "Header 2"
oTip:lLineFoot := .T.
oTip:cFoot := "Footer"
oTip:cBmpFoot := "..\bitmaps\16object.bmp"
oTip:lSplitHdr := .T.
oTip:lLeft := .T.
oTip:cBmpLeft := "..\bitmaps\16code.bmp"
oTip:lRightAlignBody := .T.
oTip:cBody := "In un posto a la macchia di cui non voglio ricordare il nome"
oTip:lBtnClose := .F. //.T.
oTip:lBorder := .F.
oTip:lBalloon := .T.
oCtrl:oToolTip := oTip
Return oTip
and this is the error
I search on this forum but I not found a solution for this error