Completely changing the color of a form

Hi,

In Delphi, changing the color of a form doesn't affect the colors of buttons on this form, as well as the color of its main menu. Is there any way to totally change the color of the form, with all its controls?

Vadim Smolensky,
Saint-Petersburg, Russia
VSmolenskyAsked:
Who is Participating?
 
pherversConnect With a Mentor Commented:
About ThemeEngine.  Installation should be enough, but if it doesn't work, try adding directory containing needed .dcu files to library path (in Delphi 7) menu Tools->Environment Options->Library->Library Path.

About ParentColor you are right esoftbg button takes color from it's parent so it won't inherit form color if it's inside a panel, oe thing you can do to accomplish this is setting Panel's ParentColor:= True;
0
 
DarkCore_Commented:
Directly I think not ... but you can do a cursor for all components ...

for i := 0 to ComponentCount - 1 do Begin
    Components[i].Color := FormColor;
End;
0
 
esoftbgCommented:
there is some buttons that have a property Color in the JEDI package of components (TJvImgBtn, TJvHTButton)
http://homepages.borland.com/jedi/jvcl/
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
esoftbgCommented:
about TJvHTButton, when the property ParentColor is True (it is as defalt True) the button gets the color from the parent Form
0
 
pherversCommented:
Well there's a lot of problems with changing colors of components. Most are using winApi and their color cannot be changed. There is a way to do this but it will also change colors in all other apps. I was recently writing an app for a client who insisted to have all controls green. Some controls as buttons can be changed easily, but i was forced to write scrollbar component and use xp style mainmenu to fulfill client demands. One solution to make custom look for an app you can find here -> http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_21184223.html i won't repeat myself the question was similiar...
0
 
VSmolenskyAuthor Commented:
Thank you all for your comments.

Unfortunately, Components[i].Color doesn't work, which is only natural because TComponent has no Color property. Either I didn't understand something or you meant something different.

I've downloaded the JEDI package of components but can't understand what to do next. It seems to be an independent software which I have to install and use it for generating all their components. It that right? Isn't there a way of just installing the component I need?
0
 
DarkCore_Commented:
As Said by esoftbg ... you can't control the back color of  most of components located in "Standard" Palette, but you can do with TMenuItems ( defining the OnDrawItem Event )

Also, all other components that have the property "Color" , as an example:
  if Components[i] is TMemo then TMemo( Components[i] ).Color := clWhite;

TButtons doesn't have the TColor Property or the OnDraw event, because are "painted" directly by windows, also the TBitButton. Of course you can use TSpeedButtons, but then you can't focus them with keyboard.

jedi is a collection of components that install into your Delphi Palette and becomes integrated with Delphi and your applications ( if you use them ). Then you can use the Jedi replacement for TButton,but this implies You must replace your buttons for this Jedi's button in all your application.

Edu
0
 
esoftbgCommented:
you have yet a directory:
....\JCL+JVCL210FullInstall
run from it:
Install.bat
and it will be apper:
Project JEDI Delphi Installer
Read carefully the check boxes to see what will be installed
Click on the button Install
and you will have JEDI - VCL Package installed
0
 
VSmolenskyAuthor Commented:
> you have yet a directory:
> ....\JCL+JVCL210FullInstall

Sorry, I haven't got a directory with such a name. Install.bat lies in the root directory called jvcl. When I run it, the installation started, but stopped at the step "Choose IDE targets" with the message "No JCL 1.9 found" - and it's still there, whatever directory I choose.
0
 
esoftbgCommented:
o.k. the direct link for JEDI package version 2.10 stable is:
http://belnet.dl.sourceforge.net/sourceforge/jvcl/JCL+JVCL210FullInstall.zip
download and unzip the file and you will have  directory ....\JCL+JVCL210FullInstall
0
 
VSmolenskyAuthor Commented:
I have already downloaded JVCL300BETA2Complete.zip - isn't it more or less the same?
0
 
VSmolenskyAuthor Commented:
Following the advice of phervers, I've downloaded the evaluation version of ThemeEngine. It seems to be a very powerful instrument. Would it be better to use ThemeEngine for making proper buttons than JEDI?
0
 
esoftbgCommented:
I am using vrsion 2.10, but it may be doesn't matter .... I hope it is a stable version ....
Just install it and from the tab Jv Additional you could be able to use the component TJvHTButton
0
 
esoftbgCommented:
About the ThemeEngine I don't know .... I don't use it yet .... Sorry. You may try it.
0
 
pherversCommented:
Theme Engine is commercial product so you have to pay for it. But it can do a lot more than changing button color you can make a completely theme'able application, here's a small example what you can make using it   http://vteam.webpark.pl/cuemaker.rar . But if you only want to change color of your buttons JVCL should make it for you. Or if u don't want to use any external components you can use bitmap buttons.
0
 
VSmolenskyAuthor Commented:
I'm thingking about buying ThemeEngine but I have some difficulties with its evaluation verion (for Delphi 6). After the installation, all its components are available in the palette, but applications with them don't run. The compiler says "File not found: te_engine.dcu". Though all the .dcu files lie in the directory ...Delphi6\themeengine and finding then shouldn't be a problem. Should I configure anything else? I couln't find the answer in the attached documents.
0
 
DarkCore_Commented:
Well, try to add Delphi6\themeengine into your library path, in Menu Tools\Environment Options .. tab Library.

Edu
0
 
HypoviaxCommented:
I am probably misunderstanding this but isn't there a property value called parentcolor?

IF this is set to true then the component adopts the color of the form otherwise it maintains its set colour.

Regards,

Hypoviax
0
 
HypoviaxCommented:
The jvhtbutton allows this parentcolor property value (jvAdditional) unlike normal buttons

Regards,

Hypoviax
0
 
esoftbgCommented:
I tested TJvHTButton, when the property ParentColor is True with the Form that contains a Panel:
  Color of the form is clBtnFace - when I drop a JvHTButton on the Form it's color is clBtnFace;
  Color of the Panel is clMaroon - when I drop a JvHTButton on the Panel it's color is clMaroon;
  Then I did change the color of the Form to clBlue - the color of the JvHTButton which Parent is Form becomes clBlue, but other JvHTButton which Parent is Panel is still clMaroon as it's Parent color ....

So, JvHTButton gets the color from it's parent Component (Form, Panel, GroupBox ....)
0
 
HypoviaxCommented:
So i am right am i not?

Regards,

Hypoviax
0
 
HypoviaxCommented:
Sorry, i didn't read all your previous posts, my comments are what you, esoftbg were saying ;).

Oh well, it just confirms your post

Hypoviax
0
 
VSmolenskyAuthor Commented:
Thank you, everybody, and sorry for my disappearance. I've purchased ThemeEngine. In many aspects it looks very impressive but still not free from some shortcomings. For example, the menu bar component they provide doesn't support radio items. The Theme Editor seems to be a powerful instrument but the help system is designed rather poorly and it's really difficult to understand how to use all its features. Is there any experts here who is an experienced user of ThemeEngine and especially of Theme Editor? Is there any material to read about it? Any discussions? The newsgroups on Theme Engine page are announced but closed.

V.S.
0
All Courses

From novice to tech pro — start learning today.