Page 1 of 1

How to set Tab Page Color

Posted: Sat Aug 29, 2009 2:16 pm
by richard-service
Hi

How to set color into Tab PAGE?
Source code Below:

Code: Select all

::oTC5Tab := TC5Tab():REDEFINE( 304, ::oDlg, RGB(198,219,250), CLR_BLACK, RGB(241,246,254) )
::oTC5Tab:nOption := 2

::oTC5Tab:AddItem( "帳款資料", ,RGB(213,228,252),, "B_Tabs_Deal16", RGB(142,179,231))
::oTC5Tab:AddItem( "發票資料", ,RGB(255,240,198),, "B_Tabs_Invoice16", RGB(255,219,116))

::oTC5Tab:bChanged := { | oTC5Tab |::oTC5Tab_P:SetOption( ::oTC5Tab:nOption ),;
                ::oTC5Tab_P:aDialogs[::oTC5Tab:nOption]:SetColor( 0, ::oTC5Tab:aItems[::oTC5Tab:nOption]:nClrPane2 ),;
                ::oTC5Tab_P:aDialogs[::oTC5Tab:nOption]:Refresh() }

REDEFINE PAGES ::oTC5Tab_P ID 305 OF ::oDlg     ;
         DIALOGS "D_DR_WIN_PayMoneyMsf_FLD11",;
                 "D_DR_WIN_PayMoneyMsf_FLD21"   ;
         FONT oFnt

 
Image

This is I want it.

Code: Select all

DEFINE WINDOW oWnd COLOR 0, RGB(142,179,231)

oBar := TC5Tab():New( 10, 10, 760, 30, oWnd, RGB(198,219,250), CLR_BLACK, RGB(241,246,254) )
oBar:nOption := 2

oBar:AddItem( "&Cuarto 1",,RGB(255,240,198),,"bmps\image4.bmp", RGB(255,219,116))
oBar:AddItem( "&Quinto 2",,RGB(255,255,255),,"bmps\image5.bmp" )
oBar:AddItem( "&_ 3")
oBar:AddItem( "&Septimo sssss")
oBar:bChanged := {|oBar| oWnd:SetColor( 0, oBar:aItems[oBar:nOption]:nClrPane2 ),oWnd:Refresh() }

oWnd:oTop := oBar
ACTIVATE WINDOW oWnd ON INIT WndCenter( oWnd:hWnd )
 
Image

Thank you.

Richard

Re: How to set Folder Page Color

Posted: Sat Aug 29, 2009 6:23 pm
by James Bott
Richard,

Have you tried the COLOR clause of the FOLDER command?

If you are putting dialogs on the folders, then you may have to color them also.

James

Re: How to set Folder Page Color

Posted: Sun Aug 30, 2009 12:03 am
by richard-service
James Bott wrote:Richard,

Have you tried the COLOR clause of the FOLDER command?

If you are putting dialogs on the folders, then you may have to color them also.

James
Hi James,

I guess maybe use Winxp Themes problem.
I test
oFld:aDialogs[1]:SetColor() not work.
oFld:aDialogs[2]:SetBrush() not work.

Richard