Board index » delphi » Change Color on a TTreeview-Node

Change Color on a TTreeview-Node


2004-03-02 11:50:39 PM
delphi193
Hello,
i want to change the color of same treeview-entries. If a flag on the
database is triggered then the color of the node has to be clred.
Has someone an idea?
Thanks in advance.
Christian
 
 

Re:Change Color on a TTreeview-Node

Off the top of my head I'd say use the OnCustomDrawItem check the Node
procedure TForm1.FilterViewCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
if Node = theRightNode then
Sender.Canvas.Font.Color:= clRed;
end;
"Christian Huber" <XXXX@XXXXX.COM>writes
Quote
Hello,

i want to change the color of same treeview-entries. If a flag on the
database is triggered then the color of the node has to be clred.

Has someone an idea?

Thanks in advance.

Christian