i wish show c5tooltip into btnbmp
I have an array type aBtn[n] on my app
here there is a small test
- Code: Select all Expand view
- #include"fivewin.ch"
function test()
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:\work\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| MyC5ToolTip( oBtn ,oDlg)}
END
nCol += 80
next n
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
//------------------------------------------------------------------------------------------------------------//
Function MyC5ToolTip( 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 := "test for Body"
oTip:lBtnClose := .F. //.T.
oTip:lBorder := .F.
oTip:lBalloon := .T.
oCtrl:oToolTip := oTip
Return oTip