Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.08.15;
Скачать: CL | DM;

Вниз

Изменений цвета TTreeNode   Найти похожие ветки 

 
Andrey   (2004-08-02 12:35) [0]

Люди подскажите, а можно ли как изменить цвет узла в TreeView?


 
GuAV ©   (2004-08-02 23:40) [1]

Да, можно. используй OnCustomDraw.

Например:

procedure TForm1.TreeView1CustomDrawItem(Sender: TCustomTreeView;
 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
 with Sender.Canvas.Font do
   if Odd(Node.Index) then
     Color:=clRed else
     Color:=clBlue;
end;


 
GuAV ©   (2004-08-02 23:44) [2]


> OnCustomDraw

имелось ввиду OnCustomDrawItem.



Страницы: 1 вся ветка

Текущий архив: 2004.08.15;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.04 c
4-1088701349
Proger
2004-07-01 21:02
2004.08.15
Создание окна


6-1085680133
Delpher_Gray
2004-05-27 21:48
2004.08.15
Тормоза TIdHTTP


6-1087218878
andrey__
2004-06-14 17:14
2004.08.15
RasApi - запуск удал. подключ. из TServiceApplication


14-1090482637
Delphi5.01
2004-07-22 11:50
2004.08.15
TrayIcon


4-1089104337
Ш-К
2004-07-06 12:58
2004.08.15
Раскладка клавиатуры