FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to set Tab Page Color
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
How to set Tab Page Color
Posted: Sat Aug 29, 2009 02:16 PM
Hi

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

Code (fw): Select all Collapse
::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




This is I want it.
Code (fw): Select all Collapse
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( "&Sexto 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 )



Thank you.

Richard
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: How to set Folder Page Color
Posted: Sat Aug 29, 2009 06:23 PM

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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: How to set Folder Page Color
Posted: Sun Aug 30, 2009 12:03 AM
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
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit

Continue the discussion