How to set Tab Page Color

Post Reply
User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

How to set Tab Page Color

Post 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
Last edited by richard-service on Sat Aug 29, 2009 11:20 pm, edited 1 time in total.
Regards,

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: How to set Folder Page Color

Post 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
User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: How to set Folder Page Color

Post 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
Regards,

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
Post Reply