Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Delphi2010: how to change the color of groupbox caption

Posted on 2011-03-22
8
Medium Priority
?
3,241 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 400 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 1600 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

670 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