Board index » cppbuilder » How to change TTreeView's *text* color?

How to change TTreeView's *text* color?

The properties "Color" and "Brush" of TTreeView only affect its background
color. How can I change the text color?

Thanks,

Rodrigo

 

Re:How to change TTreeView's *text* color?


If you want to adjust the colors of individual items, then you need to use
one of the TreeView's On...Draw events to render the text onto the Canvas
yourself manually.

Gambit

"Rodrigo de Salvo Braz" <rodrigo_b...@yahoo.deletethis.com> wrote in message
news:3de92542$1@newsgroups.borland.com...

Quote
> The properties "Color" and "Brush" of TTreeView only
> affect its background color. How can I change the text color?

Re:How to change TTreeView's *text* color?


See this article:

http://home.iprimus.com.au/starcinema2001/TreeViewWithColouredNodes.html

Hope it helps

Rodolfo

Re:How to change TTreeView's *text* color?


"Remy Lebeau \(TeamB\)" <gambi...@yahoo.com> wrote in message <news:3de92a4e$1@newsgroups.borland.com>...

Quote
> If you want to adjust the colors of individual items, then you need to use
> one of the TreeView's On...Draw events to render the text onto the Canvas
> yourself manually.

I just want to change the text color as a whole. My goal is getting
white on black. It is easy to get a black background (just property
'Color') but I haven't found a way of changing the text color.

Thanks,

Rodrigo

Re:How to change TTreeView's *text* color?


Quote
>The properties "Color" and "Brush" of TTreeView only affect its background
>color. How can I change the text color?

>Thanks,

>Rodrigo

->Pen is the font colour

Re:How to change TTreeView's *text* color?


Quote
>The properties "Color" and "Brush" of TTreeView only affect its background
>color. How can I change the text color?

>Thanks,

>Rodrigo

No sorry ... I mean ->Font

Re:How to change TTreeView's *text* color?


Quote
poor...@home.com wrote in message <news:3deb9ca9.476690671@192.168.0.1>...
>  No sorry ... I mean ->Font

That sounded like it should work, but changing ->Font->Color made no
difference. Bizarre...

Thanks,

Rodrigo

Re:How to change TTreeView's *text* color?


Quote
>poor...@home.com wrote in message <news:3deb9ca9.476690671@192.168.0.1>...
>>  No sorry ... I mean ->Font

>That sounded like it should work, but changing ->Font->Color made no
>difference. Bizarre...

>Thanks,

>Rodrigo

I presume that you are using the 'OnCustomDraw' event in your
TreeListView
Then all I do is
TTreeListViewPointer->Canvas->Font>Color = whatever for the text
TTreeListViewPointer->Canvas->Font>Brush = whatever for the background
Thats all there is to do
Cheers.. Fil

Other Threads