How to set Tab Page Color

How to set Tab Page Color

Postby richard-service » Sat Aug 29, 2009 2:16 pm

Hi

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

Code: Select all  Expand view

::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  Expand view

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.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to set Folder Page Color

Postby James Bott » Sat Aug 29, 2009 6: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: How to set Folder Page Color

Postby richard-service » 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 (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 95 guests

cron