LordDamein
asked on
Changes of label Font properties(BCB 4.0)
This one is really going to show that I have less than 2 years of C++ programming experiance....
Borland C++ Builder 4.0 pro
Here is a code snippet from a switch statement that is supposed to change the font color and style (bold) depending on the value of an editbox variable.
case 1:
{
...// some stuff
if(water == 2)
{
water = 200;
labelDiagWater->Font->Styl e = fsBold;
labelDiagWater->Font->Colo r = clYellow;
}
...// other stuff
This brings up:
[C++ Error]Main.cpp[167]: E2034 Cannot convert 'TFontStyle' to 'TFontStyles'.
If I comment out the fsBold line, the program runs fine and changes the font color to yellow when needed. I cannot get the font to change to Bold. I have tried all sorts of things, and the Borland help files, as great as they are, do not seem to be giving me the answer that I need.
Thanks...
Borland C++ Builder 4.0 pro
Here is a code snippet from a switch statement that is supposed to change the font color and style (bold) depending on the value of an editbox variable.
case 1:
{
...// some stuff
if(water == 2)
{
water = 200;
labelDiagWater->Font->Styl
labelDiagWater->Font->Colo
}
...// other stuff
This brings up:
[C++ Error]Main.cpp[167]: E2034 Cannot convert 'TFontStyle' to 'TFontStyles'.
If I comment out the fsBold line, the program runs fine and changes the font color to yellow when needed. I cannot get the font to change to Bold. I have tried all sorts of things, and the Borland help files, as great as they are, do not seem to be giving me the answer that I need.
Thanks...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well, I learned something new today!!!
Thanks...
Thanks...
To make bold use:
labelDiagWater->Font->Styl
To make unbold use:
labelDiagWater->Font->Styl