text on a panel - on init
Posted: Thu Apr 02, 2009 1:56 pm
Hello,
I have a window with a panel and would like to show a text on the panel.
It is working when I use a button to start the action to fire the oPanel:say but I don’t find a way to show
the text when starting the program automatically.
Thanks in advance
Otto
I have a window with a panel and would like to show a text on the panel.
It is working when I use a button to start the action to fire the oPanel:say but I don’t find a way to show
the text when starting the program automatically.
Thanks in advance
Otto
Code: Select all
// FiveWin for Pocket PC -
#include "FWCE.ch"
#include "C:\FWPPC\INCLUDE\DLL.ch"
#DEFINE TRUE .T.
#DEFINE FALSE .F.
//SIZE 240,320
REQUEST DBFCDX
//----------------------------------------------------------------------------//
function Main()
local oBtnEnde
local oWnd
local oTmy
local oPanel1
set default to (cFilePath( GetModuleFileName( GetInstance() ) ))
if IsExeRunning( cFileName( HB_ArgV( 0 ) ) )
MsgInfo( "The application is already running" )
return nil
endif
set deleted on
oTmy := Tmy():New()
sysrefresh()
DEFINE WINDOW oWnd TITLE "Next"
oPanel1 := TPanel():New(105,1,230,240,oWnd,.T.,CLR_BLACK, CLR_YELLOW)
oPanel1:oVScroll:SetRange( 0, 0 )
//opanel1:Say( 195,169 ,"TEST" , RGB(250,28,3) , , , .T., .T. )
@ 1, 177 BUTTON oBtnEnde PROMPT "show" SIZE 50, 15 ACTION oTmy:printsay(opanel1) PIXEL
ACTIVATE WINDOW oWnd ON INIT oTmy:printsay(opanel1)
return nil
//----------------------------------------------------------------------------//
CLASS Tmy
DATA Version
CLASSDATA lRegistered AS LOGICAL
METHOD New() CONSTRUCTOR
METHOD printsay
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( ) CLASS Tmy
::Version := "2008-12"
return self
//----------------------------------------------------------------------------//
METHOD printsay(opanel1)
//local hBmp
// DEFINE BITMAP hBmp FILE CurDir() + "\KELLNER.BMP"
// opanel1:SayBitmap( 50,50, hBmp, , )
opanel1:Say( 69,69 ,"TEST" , RGB(250,28,3) , , , .T., .T. )
return NIL
//----------------------------------------------------------------------------//