Board index » cppbuilder » Text color in a Canvas

Text color in a Canvas


2006-01-20 07:52:29 PM
cppbuilder32
Hello!!
I created a TImage box calle pbox. Then I set
pbox->Canvas->Pen->Color = clRed;
Everything goes fine when I use the LineTo method: it draws a red line.
But when I use TextOut I only get BLACK text. How doI change text color in a
Canvas?
Thanks!!
Andrea
 
 

Re:Text color in a Canvas

Bono escreveu:
Quote
Hello!!
I created a TImage box calle pbox. Then I set

pbox->Canvas->Pen->Color = clRed;

Everything goes fine when I use the LineTo method: it draws a red line.
But when I use TextOut I only get BLACK text. How doI change text color in a
Canvas?

Thanks!!
Andrea


The same way you have done for the Pen
pbox->Canvas->Font->Color = clRed;
HTH
Antonio