<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I havent attacked this problem yet as there many more I have to sort
out.&nbsp;&nbsp; For example if a control is moved after creation, it tends to
not show.&nbsp; I did expect to have to put a panel on the tabs so that the
colours would match the rest of the panels.&nbsp; Since we always used
descended components, its not much of a hassle to fix.<br>
<br>
John Bird wrote:
<blockquote cite="mid:000001c77dae$c47d3570$7001a8c0@JohnSony"
 type="cite">
  <pre wrap="">This interests me too - there are a number of components where there are no
properties to control the background colour etc.  The XP manifest turns page
controls to a white background.   Personally I fiddled then just gave in and
used it as is - so now my page controls are white.  

There is a lot that can be done with careful matching of colours in the
standard VCL - here are a couple I use:

1 - I have a list box where I turn the border off and set the background
colour to clBtnFace - it gives a neat area of the screen with no borders
that can scroll (The scroll bar still shows -it's the only cue that the area
can be scrolled).

        Listbox1.borderstyle:=bsNone;
        listbox1.color:=clBtnFace;


2 - Another trick is having a page control under program control - hiding
the borders and tabs and changing the current tab programmatically, for
instance with a menu or button click, which gives multiple layouts on the
same form.

procedure TForm1.HideTabsInPageCtrl;
Var
iPage: Integer;
begin
  // hide the tabs
  for iPage := 0 to PageControl1.PageCount - 1 do
    PageControl1.Pages[iPage].TabVisible := False;
  // set the active tabsheet
  if (PageControl1.PageCount &gt; 0) then
    PageControl1.ActivePage := PageControl1.Pages[0];                //this can
be altered later in the program
  // hide the border of the pagecontrol
  PageControl1.Style := tsButtons;
end;

This also does put the page control back into clBtnFace - I haven't found
another way yet :)


3 - TButton   This standard control I am surprised at how little there is to
alter - I have a version from Delphi About.Com (ColorButton) that I modified
further to give full control over text and background colour on a button,
with optional changes in both when the mouse goes over the button.  I also
added a split level background colour, so that the lower half is
automatically drawn a bit darker than the top half on mouse-over - this is
similar to how tabs and buttons are rendered in lots of software these days,
eg look at the Firefox and IE7 tabs.  Also optionally the text font gets
bolded on Mouse over.  I think this is quite like the trend in Vista etc
where effectively buttons are becoming quite large (eg in the new dialogs
with a large amount of text in them), and often do reflect a change in
appearance on mouse over...I had this working on D5 and D2006 so I suspect
it's a component that will travel easily to later versions too...  The
standard Tbutton does show some (olive) highlighting with the XP manifest on
mouse-over, but still has no control over background colour so I use both.
Happy to share it - especially if anyone improves on it further.

John



-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@delphi.org.nz">delphi-bounces@delphi.org.nz</a> [<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@delphi.org.nz">mailto:delphi-bounces@delphi.org.nz</a>] On
Behalf Of Robert martin
Sent: Friday, 13 April 2007 4:29 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] XP / Vista Themes


Hi all

Just playing with themes and notice that where we have edit combos 
placed on Tab pages the colour is different.  We had set the colour of 
some as clBtnFace so that their background colour was the same as the 
form/ groupbox/ panel/ tab page they were on.  However with themes 
enabled pagecontrols are using a different colour to clBtnFace.

How do I set them to the same colour as the component they are on?  
.ParentColor seems to get the forms colour / not the pageControls and 
the page control does not have a colour property.

Any suggestions ?


  </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<title>Signature</title>
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2900.2802" name="GENERATOR">
<div align="left">
<div align="left"><strong><font size="2"><font color="#666666"
 face="Verdana">Rohit Gupta</font></font></strong></div>
<div align="left"><strong><font size="2"><font color="#666666"
 face="Verdana">
B.E.&nbsp;Elec.&nbsp;&nbsp;&nbsp;M.E.&nbsp;&nbsp;&nbsp;Mem&nbsp;IEEE&nbsp;&nbsp;&nbsp;
Associate&nbsp;IEE</font></font></strong></div>
<div align="left"><strong><font size="2"><font color="#666666"
 face="Verdana">Technical&nbsp;Manager</font></font></strong></div>
<div align="left"><strong><font color="#666666" face="Verdana" size="2">Computer
Fanatics Limited</font></strong></div>
<div align="left"><strong></strong>&nbsp;</div>
<div align="left"><font color="#666666" face="Verdana" size="2"><strong>Tel</strong>&nbsp;&nbsp;&nbsp;&nbsp;
+64 9 4892280</font></div>
<div align="left"><font color="#666666" face="Verdana" size="2"><strong>Fax</strong>&nbsp;&nbsp;&nbsp;
+64 9 4892290</font></div>
<div align="left"><font color="#666666"><font face="Verdana" size="2"><strong>Email&nbsp;
</strong></font><a href="mailto:rohit@cfl.co.nz"><font color="#0080ff"
 face="Verdana" size="2">rohit@cfl.co.nz</font></a></font><font
 color="#666666"><font face="Verdana" size="2"><strong></strong></font></font></div>
<div align="left"><font color="#666666"><font face="Verdana" size="2"><strong>Web&nbsp;&nbsp;
&nbsp;</strong></font><a href="http://www.cfl.co.nz/"><font color="#0080ff"
 face="Verdana" size="2">www.cfl.co.nz</font></a></font></div>
<div>&nbsp;</div>
<div>
<hr></div>
<div align="left"><span
 style="font-size: 7.5pt; color: rgb(153, 153, 153); font-family: Verdana;"><font
 size="1"><span style="font-size: 10pt; font-family: 'Courier New';"
 lang="EN-NZ"><font color="#000000"><font color="#808080" face="Verdana"
 size="1">This email and any attachments contain information, which is
confidential and may be subject to legal privilege and copyright. If
you are not the intended recipient, you must not use, distribute or
copy this email or attachments. If you have received this in error,
please notify us immediately by return email and then delete this email
and any attachments.</font> <o:p></o:p></font></span></font></span></div>
</div>
</div>
</body>
</html>