test.prg
- Code: Select all Expand view
// In place tooltips demo
#include "FiveWin.ch"
function Main()
local oWnd, oSay1, oSay2, oSay3
DEFINE WINDOW oWnd TITLE "Tooltips in place test"
@ 2, 2 SAY oSay1 PROMPT "This is a tooltips test for any text length" COLOR "N/W*"
oSay1:lWantClick = .T.
oSay1:bMMoved = { || ShowTooltip( oSay1 ) }
@ 4, 2 SAY oSay2 PROMPT "This is another long text" COLOR "N/R*"
oSay2:lWantClick = .T.
oSay2:bMMoved = { || ShowTooltip( oSay2 ) }
@ 6, 2 SAY oSay3 PROMPT "FiveWin power!" COLOR "N/G*"
oSay3:lWantClick = .T.
oSay3:bMMoved = { || ShowTooltip( oSay3 ) }
ACTIVATE WINDOW oWnd
return nil
function ShowTooltip( oSay )
if oSay:Cargo == nil
oSay:Cargo = TToolTip():New( oSay, oSay:GetText() )
oSay:Cargo:SetWidth( 1000 )
endif
return nil