Remy Lebeau (TeamB)
2008-02-07 17:52:34 UTC
But if I try the following to change the Font or Style
EditControls[Row][Col]->Font->Style->fsItalic = true;
Or
EditControls[Row][Col]->Font->Style = fsItalic;
then I get the following error messages for each attempt
That is not the correct way to use the Style property. You need to use theEditControls[Row][Col]->Font->Style->fsItalic = true;
Or
EditControls[Row][Col]->Font->Style = fsItalic;
then I get the following error messages for each attempt
'<<' and '>>' operators instead in order to enable/disable individual
values, ie:
// enable fsItalic
EditControls[Row][Col]->Font->Style =
EditControls[Row][Col]->Font->Style << fsItalic;
// remove fsItalic
EditControls[Row][Col]->Font->Style =
EditControls[Row][Col]->Font->Style >> fsItalic;
If you just want to enable fsItalic and remove all other styles, then you
can do this instead:
EditControls[Row][Col]->Font->Style = TFontStyles() << fsItalic;
Gambit