Solved

Delphi2010: how to change the color of groupbox caption

Posted on 2011-03-22
8
2,855 Views
Last Modified: 2012-05-11
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
Comment
Question by:wantime
  • 7
8 Comments
 
LVL 19

Expert Comment

by:Thommy
ID: 35187830
0
 
LVL 19

Expert Comment

by:Thommy
ID: 35187850
Under the Windows XP setting, can you control group box caption color?
http://www.delphipages.com/forum/showthread.php?t=145977
0
 
LVL 19

Expert Comment

by:Thommy
ID: 35187868
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 19

Expert Comment

by:Thommy
ID: 35187877
Try this and tell me if it works...

GroupBox1.Font.Color:=clRed;
0
 
LVL 24

Assisted Solution

by:jimyX
jimyX earned 100 total points
ID: 35187884
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
 
LVL 19

Accepted Solution

by:
Thommy earned 400 total points
ID: 35187921
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
 
LVL 19

Expert Comment

by:Thommy
ID: 35188017
Have checked it under Delphi 2010 and it also works...

0
 
LVL 19

Expert Comment

by:Thommy
ID: 35188087
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question