• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1676
  • Last Modified:

TToolBar Color Change Problem on Theme XP

Hi,

My projected is a MDI Application  compiled on Delphi 7 (Build 8.1) (OS: XP SP2 Build 2600).
The main form has a TToolBar (Properties: Color = clBtnFace; ParentColor = False)

If XP Theme is configured for "Windows Classic" it works OK. If XP theme is configured for
"Windows XP" the TToolBar resets it´s color to TMainForm.Color = clAppWorkspace on application startup.

Thanks in advance for all the help.

Vieira da Silva
0
intercad
Asked:
intercad
  • 6
  • 4
1 Solution
 
intercadAuthor Commented:
I tested TXPManifest component and FileName.exe.manifest with the same results...
0
 
mikelittlewoodCommented:
There is an issue with ParentColor or ParentBackground.

Try turning parent background to true and recompiling/run, then set it back to false and do the same.
0
 
mikelittlewoodCommented:
Yeah I get the same problem when I use the TXPManifest component.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
mikelittlewoodCommented:
Once you set it back to false you should be able to choose the color you want correctly.
0
 
intercadAuthor Commented:
>There is an issue with ParentColor or ParentBackground.

>Try turning parent background to true and recompiling/run, then set it back to false and do >the same.

Do you mean ToolBar.ParentColor?

I tested the procedure with ToolBar.ParentColor with no positive results...
0
 
mikelittlewoodCommented:
ok after having another quick look I see there is no parent background property for the toolbar.

the only way I could get the toolbar to have its own color was to put it on a panel at the top of the form.
Then turn the parentbackground to true for the panel, run, then reset back to false and run.

Ill carry on playing to see if there is a way of doing it without a panel.
0
 
intercadAuthor Commented:
Yes, that way it works OK.
0
 
mikelittlewoodCommented:
Nope I cant seem to do it without using a panel behind the toolbar.
Add your toolbar to a panel and set the toolbar to Align=alCient and adjust the size of the panel to the size a toolbar is normally.
0
 
intercadAuthor Commented:
Thanks for your support...
0
 
mikelittlewoodCommented:
Glad I could help.
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now