Color problems with components in Delphi 2009?

Hi list ~

just wrote a little visual component that is made up from a few multi-colored panels. At design time the colors show nicely and also when I use the component in a non-themed application.

In a themed application  ('Use Themes' checkbox checked) the entire components loses its colors and turns clBtnFace.

Anybody have an idea what's up?

TIA
Kai
0
Kai
10/9/2009 2:00:05 AM
public.delphi.vcl.writing 510 articles. 0 followers. Follow

5 Replies
582 Views

Similar Articles

[PageSpeed] 42

> {quote:title=Kai Peters wrote:}{quote}
> Hi list ~
> 
> just wrote a little visual component that is made up from a few multi-colored panels. At design time the colors show nicely and also when I use the component in a non-themed application.
> 
> In a themed application  ('Use Themes' checkbox checked) the entire components loses its colors and turns clBtnFace.
> 
> Anybody have an idea what's up?

Sure. Your components are respecting themes.

If you use themes (by checking the "Use Themes" checkbox, obviously), you're telling Windows you want everything possible drawn using the theme selected. Your components are doing what they're supposed to do.
0
Ken
10/9/2009 2:26:34 PM
> {quote:title=Ken White wrote:}{quote}
> > {quote:title=Kai Peters wrote:}{quote}
> > Hi list ~
> > 
> > just wrote a little visual component that is made up from a few multi-colored panels. At design time the colors show nicely and also when I use the component in a non-themed application.
> > 
> > In a themed application  ('Use Themes' checkbox checked) the entire components loses its colors and turns clBtnFace.
> > 
> > Anybody have an idea what's up?
> 
> Sure. Your components are respecting themes.
> 
> If you use themes (by checking the "Use Themes" checkbox, obviously), you're telling Windows you want everything possible drawn using the theme selected. Your components are doing what they're supposed to do.


Well, while that sounds like a very obvious answer, I don't think it is.

Start a new app, create a form, color it, enable RT themes and you will see that your form displays the color you set it to and *not * clBtnFace.
To my knowledge, RT themes only affect color constants like clBtnFace and others, but leave 'real' colors (like clBlue etc.)alone.

So again, is there a way to have a RT themes enabled app that will leave the colors chosen for my component alone?

Kai
0
Kai
10/9/2009 4:33:32 PM
> just wrote a little visual component that is made up from a few
> multi-colored panels. At design time the colors show nicely and also
> when I use the component in a non-themed application.
> 
> In a themed application  ('Use Themes' checkbox checked) the entire
> components loses its colors and turns clBtnFace.
> 
> Anybody have an idea what's up?

An educated guess: the ParentBackground property of your custom control
is set to True - set it to False in an override of Create.

-- 
Chris Rolliston
http://delphihaven.wordpress.com/
0
Chris
10/9/2009 8:15:43 PM
<Kai Peters> wrote in message news:170837@forums.codegear.com...

> just wrote a little visual component that is made up from a few 
> multi-colored
> panels. At design time the colors show nicely and also when I use the
> component in a non-themed application.
>
> In a themed application  ('Use Themes' checkbox checked) the entire
> components loses its colors and turns clBtnFace.

Assuming you are using TPanel for your panels, then TPanel is drawn 
transparent when themed, so you are seeing the Color of your base component 
instead.  If you do not want TPanel to be drawn themed, then set its 
ParentBackground and ParentColor properties to False.  It will then respect 
its own Color property.

-- 
Remy Lebeau (TeamB)
0
Remy
10/9/2009 8:28:37 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> <Kai Peters> wrote in message news:170837@forums.codegear.com...
> 
> > just wrote a little visual component that is made up from a few 
> > multi-colored
> > panels. At design time the colors show nicely and also when I use the
> > component in a non-themed application.
> >
> > In a themed application  ('Use Themes' checkbox checked) the entire
> > components loses its colors and turns clBtnFace.
> 
> Assuming you are using TPanel for your panels, then TPanel is drawn 
> transparent when themed, so you are seeing the Color of your base component 
> instead.  If you do not want TPanel to be drawn themed, then set its 
> ParentBackground and ParentColor properties to False.  It will then respect 
> its own Color property.
> 
> -- 

Thanks - that does it.

K.
> Remy Lebeau (TeamB)
0
Kai
10/10/2009 5:59:41 PM
Reply:

Similar Artilces:

ANN: Bricksoft IM VCL Component v8.2 released. All components support Delphi 2009!
All components support Delphi 2009! Please download the trial version(http://www.imcomponents.com/bsimtrial.zip) if you like. -- Bricksoft Support Bricksoft IM(MSN+YAHOO+AIM+ICQ+Jabber/GTalk) SDK For NET/VCL/COM/SOAP - http://www.imcomponents.com/ "Jianmin Wu" <nospam@nospam.com> wrote in message news:72535@forums.codegear.com... > All components support Delphi 2009! with D2009 support, do you still require TNT controls for unicode ? Also do you have any plans to support emoticons ? Regards, Danny Component and demo for D2009 don't need TNT cont...

Installing Components Problem Delphi 2009
Hello, I´am trying to install some Thirdy Party Components in Delphi 2009 but I´am having trouble with the location. When I build the Package they go to another folder,my old delphi 2007 folder, and on the one that I choose. I aredy configureted the Path for BPL,DCUs and DCPs but this componentes don´t go follow it.I mean, I can build my old projects fine, but thoose ones no[ o.0 ]. Some information: on the "Target Core Compile:" there is a line who contains: -LE"C:\Delphi2007"(my old folder for delphi) -Le"c:\Delphi2007" -No"C:\Temp&quo...

Problems
Hi; We have a software developed in the Delphi 2009 and we do NOT use the runtime themes. So, the option: Projetct / Options / Application / Enable Runtime Themes is UNCHECKED. When I'm on the Delphi 2009, it's all right. The problem is when I use the Delphi 2010. The same configuration (Projetct / Options / Application / Enable Runtime Themes is UNCHECKED). The form editor (IDE) insists on show the forms with the current Windows theme. I don't like this, I want the runtime themes off while I'm programming and editing my forms. How can I solve it? Thanks to...

Delphi 4 to Delphi 2009
Hello, Thanks to all who answered my previous question. That was a great help. And atlast our client agreed to upgrade our delphi version from 4 to Delphi 2009. *Sigh*. But before that, I need to give the estimation and cost regarding the migration to delphi 2009. Can anyone tell me is there any tool to migrate from delphi 4 to delphi 2009 or just I need to compile our Delphi 4 application in Delphi 2009. I have read from the delphi 2009 feature matrix that Delphi 1 through Delphi 2007 import is possible in delphi 2009. But i am not that sure considering the size of our application. ...

Delphi 5 To Delphi 2009
I upgraded to Delphi 2009 from D5. The install says I can install Delphi and/or C++. Delphi installed OK but I see nothing of C++. What am I missing or does my upgrade not include C++? Thanks It depends on what you bought. If you bought Delphi 2009 only, that's what you get. If you bought Delphi 2009 and C++ Builder 2009 you get both. My guess is you got Delphi 2009 only. The simplest way to verify is look your invoice - it should say I would think. You could also go to members.embarcadero.com, login, then click on my registered products. There will be a textual description of...

Problem about Indy 10, IdTelnet component in Delphi 2009
Dear all: I make a simple test telnet program communicate with a linux server , through Idtelnet component , I specify the host property with a server ip, use a button to connect to the server . and display the welcome message in a memo . code as blew : procedure TForm1.Button1Click(Sender: TObject); begin Telnet.Connect; end; procedure TForm1.TelnetDataAvailable(Sender: TIdTelnet; const Buffer: string); begin Memo1.Lines.Add(Buffer); end; But when I click the button , the message displayed in the memo is like " }} }#}' ", not the normal...

Delphi 2009 : Component -> Install packages problem
Hello. I have 1 project (X.bpl) who contains components for design time. Each time I load delphi 2009, it says ("The application has failed to start because X.bpl was not found. Re-installing the application may fix the problem". If i check/uncheck the case : an error like "The specified module can not be found". However if I use "add" and put my package back with it, it works. Tried to check the default case. Nothing changed when I loaded the ide again. I tried to change paths and so on. But nothing made it work. What can I do to have my packages loading ...

SEPA components for Delphi with Source Code (Delphi 5
Hi all, in the european union change next year the Bankingformat to the SEPA Format. All peoples and companies must change the bankingssoftware and the costumer data form acountnummers in the new IBAN and BIC numbers. See: http://www.arma-it.de/shop/artikelueber.php?wgruppeid=211&wgruppe_offen=211 Functions: - generate SEPA XML'S - Calc IBAN - BIC Database (DE,AT and CH) Questions: vertrieb@arma-it.de PS: Bankinssoftware for Develpoers (Germany only) http://www.arma-it.de/shop/artikelueber.php?wgruppeid=212&wgruppe_offen=212 El 26/10/13 21:38, A...

is there a Delphi 2007
Would be nice to have a bundle of the latest Delphi packages. Gilbert Padilla wrote: > Would be nice to have a bundle of the latest Delphi packages. > I expect Delphi 2007 will only be on sale until the full RAD Studio 2009 edition is published, including Delphi 2009.net. W ...

Delphi 7 to Delphi 2009 conversion
Hello group, What do I need to do to comile the following code in D2009. Compiler error after the Else E2010: Incompatible Types 'AnsiChar' and 'Char' if isUnicode then SearchHandle := FindFirstFilew( PWideChar( fn ), FindDataW ) else SearchHandle := FindFirstFile( PAnsiChar( Ansistring( fn ) ), FindDataA ); <<<<<compiler error in the above line >>>>>>>>>>> Regards, Bryan > What do I need to do to comile the following code in D2009. > Compiler error after the Else > E2010: Incompati...

Delphi 2009 alongside Delphi 2007
Hi all, I am about to install Delphi 2009 on the same development system as Delphi 2007, before I embark is there anything I should be aware of so as to not break my Delphi 2007 installation and projects ? Thanks JT John Taylor wrote: > Hi all, > > I am about to install Delphi 2009 on the same development system > as Delphi 2007, before I embark is there anything I should be aware > of so as to not break my Delphi 2007 installation and projects ? As long as you install into a separate folder there is no problem with the two versions getting into each other...

Upgrading to Delphi 2009 from Delphi 5
I've decided it's time to upgrade to Delphi 2009 Professional from my current Delphi 5 Professional which (according to the FAQ) makes me eligible for the upgrade pricing. However, I'd just like to clarify how this process works. My concern is that my Delphi 5 is not registered on the CodeGear site and this doesn't seem to be possible as far as I can tell. When installing the trial I noticed that Delphi 2009 registers itself with your CodeGear account so does this mean that the previous version must be registered there to verify you own a Professional edition? I plan to o...

Delphi 2007 to Delphi 2009 Conversion
CharArrayPtr = ^CharArray; CharArray = array[0..MaxInt-1] of Char; How to convert to Delphi 2009? Bill Bill Miller wrote: > CharArrayPtr = ^CharArray; > CharArray = array[0..MaxInt-1] of Char; > > How to convert to Delphi 2009? > > Bill it depends heavelly on how it is used fearther down in your project and what you want to convert it to. I you want to simple convert the declarations ignoring UNicode altogether then the only think you have to change is the CharArray declaratin from a Char to an AnsiChar eg CharArrayPtr = ^CharArray; CharArray =...

component installation in delphi 2009 and C++ builder 2009
hi all, I going to migrate from delphi to c++ builder. and also just installed RAD studio 2009. when I install a delphi component, I see it only in delphi ide Tool Palette (while see them in design packages of rad) but when I try install its C++ builder version in c++ builder ide, RAD tell me that its file is associated with one of installed components and i can't install it. what can i do for Making delphi component visible at c++ builder ide, or Installing their c++ builder version? regards js I'm not an expert here, and to be honest, I'm pretty confused by the whole ...

Web resources about - Color problems with components in Delphi 2009? - public.delphi.vcl.writing

Component - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

AirAsia disaster: Indonesia cites faulty component, crew response in crash
Pilots appear to have reset the computer system's circuit breaker, leading to a series of failures that caused them to lose control of the plane ...

Teardown of iPad Pro reveals revamped component layout
... Apple device teardown on the iPad Pro on Wednesday, revealing a reworked internal design dominated by massive batteries and bespoke audio components. ...

Japan follows US lead in banning certain Takata components
Filed under: Government/Legal , Safety , Japan Like the US, Japan will ban certain Takata's airbag inflators from vehicles in development, and ...

Samsung reportedly lost key iPhone 7 component business
... for Samsung , which is ironic considering the two companies are fierce rivals in the mobile business. The Korean giant produces various components ...

Crew, faulty component caused AirAsia crash
Indonesian investigators said crew action and a faulty component caused the AirAsia jet crash in the Java Sea last year, killing 162 passengers. ...

IDG Contributor Network: Four critical patches for November Patch Tuesday update core Windows and Office ...
Microsoft's November Patch Tuesday brings us four critical updates and eight important patches that attempt to resolve 54 reported vulnerabilities ...

Immigration Law Enforcement: A Vital Component Of National Security And Counterterrorism
While the administration claims that these refugees are being vetted, there is no way to actually screen these people

OLEDWorks finalizes acquisition of key parts of Philips OLED light source components business
OLEDWorks has announced that it has completed the acquisition of key OLED assets and relevant intellectual property from Royal Philips. Manufacturing ...

Teflon Component Tied to Kids' Weight Gain
PFOA, a main component of Teflon, has been linked to increased body fat and faster weight gain in children.

Resources last updated: 12/24/2015 1:58:07 PM