I print a text on a brush in a main window.
But when I open a client window in the main window
it clears the text printed in the main window.
How can I get rid of this problem?
Many Thanks
Birol Betoncu
#include "FiveWin.ch"
#include "xbrowse.ch"
static oWndMain
function Main()
local oBrush,oFont
DEFINE BRUSH oBrush COLOR nRGB( 12, 129, 87 )
DEFINE WINDOW oWndMain ;
BRUSH oBrush ;
MDI ;
MENU BuildMenu()
ACTIVATE WINDOW oWndMain MAXIMIZED ON PAINT PaintRtn()
return nil
STATIC FUNCTION PaintRtn()
LOCAL oFont,cYear:='2006'
DEFINE FONT oFont NAME "ARIAL" SIZE 100, -180
@ 15,40 SAY cYear OF oWndMain FONT oFont ;
COLOR CLR_YELLOW, nRGB( 12, 129, 87 ) ;
SIZE 500,200
oFont:End()
RETURN NIL
STATIC FUNCTION BuildMenu()
LOCAL oMenu
MENU oMenu
MENUITEM "Test"
MENU
MENUITEM "Test" ACTION TestRtn(oWndMain)
ENDMENU
ENDMENU
return oMenu
STATIC FUNCTION TestRtn(oWnd)
local oChild, oBrw, aArray:={}
AADD(aArray,{'aaaa','aaaaaaaaaaaaaa','aaaaaaaaaaaaaa','aaaaaaaaaaaa'})
DEFINE WINDOW oChild ;
FROM 0, 0 TO 500,400 ;
MDICHILD ;
PIXEL ;
OF oWnd
oBrw := TXBrowse():New( oChild )
oBrw:SetArray( aArray)
oBrw:aCols[1]:cHeader := "Head-1"
oBrw:aCols[2]:cHeader := "Head-2"
oBrw:aCols[3]:cHeader := "Head-3"
oBrw:aCols[4]:cHeader := "Head-4"
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:lRecordSelector := .f.
oBrw:CreateFromCode()
oChild:SetControl(oBrw)
ACTIVATE WINDOW oChild ON INIT oBrw:SetFocus()
RETURN NIL
STATIC FUNCTION PaintRtn()
LOCAL oFont,cYear:='2006'
DEFINE FONT oFont NAME "ARIAL" SIZE 100, -180
oWndMain:oWndClient:Say( 15, 40, cYear, CLR_YELLOW, nRGB( 12, 129, 87 ), oFont )
oFont:End()
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: cmsoft, nageswaragunupudi and 89 guests