Solved

RadioButton/Checkbox Fonts not changing

Posted on 2008-10-29
7
1,278 Views
Last Modified: 2013-11-17
HI Everyone,

I'm using Borland c++ builder 6. I'm trying to change the colour of my radiobuttons/checkboxes fonts to white. At design time, the fonts turn white, however, when i run the app the radiobuttons and checkboxes all seem to revert back to black font.

Any Ideas.

Thanks
0
Comment
Question by:chudmarek
  • 3
  • 3
7 Comments
 
LVL 2

Accepted Solution

by:
graber earned 250 total points
ID: 22842040
Iteresting could you post your source. Im using 6.0 as well and don't have a problem.

void __fastcall TForm1::RadioButton1Click(TObject *Sender)
{
   RadioButton1->Font->Color = clRed;
   RadioButton2->Font->Color = clBlack;
}
//---------------------------------------------------------------------------
 
void __fastcall TForm1::RadioButton2Click(TObject *Sender)
{
   RadioButton1->Font->Color = clBlack;
   RadioButton2->Font->Color = clRed;
}
//---------------------------------------------------------------------------

Open in new window

0
 

Author Comment

by:chudmarek
ID: 22845723
HI Graber,

I changed all the properties at design time, and all the colours appear how they should. but when i run the app it all changes back to black font.

I event tried using code RadioButton1->Font->Color = clWhite;
and still nothing.....it has me very stumped.

Do u think it could have anything to do with parent options.....
0
 

Author Comment

by:chudmarek
ID: 22845924
Furhter Update,

If i use RadioButton1->Brush->Color = clWhite; the color change works.....RadioButton1->Font->Color = clWhite;  does not
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 
LVL 16

Assisted Solution

by:George Tokas
George Tokas earned 250 total points
ID: 22852646
>>If i use RadioButton1->Brush->Color = clWhite; the color change works.....RadioButton1->Font->Color = clWhite;  does not
All those depends on WHERE that line is....
The explaination USUALLY is that you are changing the color in your call but the IDE changes when initializing the application...
Check out the following:
Drop a TTimer at your main form and give it an interval of 10mS...
When the handler of the timer is fired then the application finished initializing the form(s) and now you can change whatever you want...
Disable the timer and place the font color change code there and see...
This is a problem I have using Direct3D...
The OnPaint handler called BEFORE Direct3D initialized and that cause Access Violation(s)...
By placing the timer all I'm doing inside the handler is to check the timer status and if it is NOT enabled I know that:
Constructor is called and finished.
OnCreate and OnShow also finished...

George Tokas.
0
 
LVL 2

Expert Comment

by:graber
ID: 22895092
hey george and sorry chudmarek for the delay.  chudmarek could you post the unit of code for gtokas and i to look at?
0
 

Author Comment

by:chudmarek
ID: 22926818
I have come to the conclusion that my app is corrupt somewhere, I tried the same code in another app and it worked fine.....this is too easy of a problem to be this annoying!.....anymore thoughts?
0
 
LVL 2

Expert Comment

by:graber
ID: 22931442
not really without seeing the rest of the code.  Good fortune though as you press on.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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
populate value from mongo db in java 98 365
java class in read only mode in eclipse 2 163
What (WYSIWYG) editor is used for questions and comments? 5 144
Visual Studio Debugging 3 138
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

839 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