Page 1 of 1

How do you set the FontStyle in c++ builder

Posted: Fri Oct 06, 2006 10:23 pm
by Guest
Folks - so now I'm stuck on setting the FontSTyle in c++ builder.

I looked at the samples and found the following...

// Don't know how to write this in C++ ...
// XLS->Sheet[ 0 ]->Cell[ 0][1 ]->FontStyle = [xfsBold,xfsItalic];


Not very helpful - what chance do I stand !!!

The code above will not compile.

Any help would be very appreciated - it's a big shame their isn't more C++ in the helpfile - life would be easier :x

Thanks

Karl

Posted: Tue Dec 12, 2006 11:39 am
by Zul-Jin
FontStyle = TFontStyles() << fsBold

I tried it too!

Posted: Mon May 05, 2008 1:48 pm
by Spastika
Hi Guys

I interpreted the advice that was given as follows:

Code: Select all

XLS->Sheet[ 0 ]->Cell[ 0][1 ]->FontStyle = TFontStyles() << fsBold;
The Message I then get when I try to compile is:
  • [C++ Error] Main.cpp(37): E2034 Cannot convert 'TFontStyles' to 'TXFontStyles'
What to do, what to do!?

I hope someone can help

Regards

Deon