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

Delphi2010: how to change the color of groupbox caption

hi all,

when groupbox is disabled, the color of caption doesn't change. Are there any way to change the color into grey?

thanks,

wantime
0
wantime
Asked:
wantime
  • 7
2 Solutions
 
ThommyCommented:
0
 
ThommyCommented:
Under the Windows XP setting, can you control group box caption color?
http://www.delphipages.com/forum/showthread.php?t=145977
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ThommyCommented:
Try this and tell me if it works...

GroupBox1.Font.Color:=clRed;
0
 
jimyXCommented:
Well, there is no direct way to change that.
You have two options:
1.
Clear the TGroupBox caption and place a TLabel and set its properties.

2.
Drive your own component and add extra property to the component:
http://www.delphipages.com/forum/showthread.php?t=160212
0
 
ThommyCommented:
Set "Enable:=False" for all controls in your group Box

Set "GroupBox1.Font.Color:=clGrey" to change caption font color to grey

This works with Delphi 2007!!!
0
 
ThommyCommented:
Have checked it under Delphi 2010 and it also works...

0
 
ThommyCommented:
You can disable all controls inside your groupbox as follows:

for i:=0 to GroupBox1.ControlCount-1 do
  GroupBox1.Controls[i].enabled:=false;

Open in new window

0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

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