Вниз
Скачать: CL | DM;

цвет строки в ListBox   Найти похожие ветки 

 
Mistic ©   (2003-12-09 14:36) [0]

Как изменить цвет определенной строки у ListBox?


 
sokohigh   (2003-12-09 14:56) [1]

Пример для CheckListBox-а (подойдет и для ListBox):

CheckListBox1.Style := lbOwnerDrawFixed

procedure TfmSetSelector.CheckListBox1DrawItem(Control: TWinControl;
Index: Integer; Rect: TRect; State: TOwnerDrawState);
begin
with TCheckListBox(Control).Canvas do begin
if not (odSelected in State) then begin
if (какое-нибудь условие) then
Brush.Color := ЦветВыделенияНевыбраннойСтроки
;
end else begin
if (то же условие) then
Brush.Color := ЦветВыделенияВыбраннойСтроки
;
end
;
FillRect(Rect);
with TCheckListBox(Control) do
TextOut(Rect.Left, Rect.Top, Items[Index])
;
end
;
end;



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

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.012 c
1-62016
Zero Ice
2003-12-06 19:40
2003.12.19
autoexec.bat?


3-61911
Lexxxx
2003-11-27 13:03
2003.12.19
настройка полей таблицы


3-61979
Крутыш
2003-11-23 12:46
2003.12.19
Проблемы c Post


1-62142
MaxDDinc
2003-12-07 15:49
2003.12.19
Проблема с RichEdit


14-62216
REA
2003-11-26 15:38
2003.12.19
SMS




   Наверх