Solved

Delphi2010: how to change the color of groupbox caption

Posted on 2011-03-22
8
2,974 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Reconfigure Delphi Install? 2 64
SUM 2 INTEGER ARRAYS INTO 1 10 111
update joined tables 2 62
File Downloader in Multi threading , Measure Download Speed and progress 9 26
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

740 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