• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3660
  • 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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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