Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Color & TPageControl

Status
Not open for further replies.

barryp

Programmer
Jan 30, 2002
48
GB
Hi

In Delphi 2 TPageControl & TTabSheet had properties Color & ParentColor just like most other controls

Now in Delphi 5 I can't find these properties

How can I overcome this ?

Barryp
 
Are you trying to change the color of the pagecontrol or just the Tabsheets? If you only need to change the Tabsheets, you can drop a panel onto each sheet, remove the panels border, align the panels to alClient and set the panels color.

Im sure there must be a way of changing the pagecontrols color but I havent found one yet!
 
Eric

Thanks for the response

I've already got Panels on the TabSheets but it's the TAB itself which won't change color

Barryp
 
Just noticed, the parentcolor properties can be accessed by setting the OwnerDraw property to True. This works for both the pagecontrol and its individual TabSheets.
 
Sorry - don't follow you
I set OwnerDraw true, loose all my tabsheet labels & don't see any new properties
 
I cant seem to get the Tabs to change color now but I can change the color of the pages and the area surrounding the tabs.

PageControl1.Brush.Color := clBlue;
Tabsheet1.Brush.Color := clBlue;

Im sure that there is a way of changing the tab color and my guess is its a variation no the two lines of code above.
 
I cant seem to get the Tabs to change color now but I can change the color of the pages and the area surrounding the tabs.

PageControl1.Brush.Color := clBlue;
Tabsheet1.Brush.Color := clBlue;

Im sure that there is a way of changing the tab color and my guess is its a variation on the two lines of code above.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top