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

TListBox   Найти похожие ветки 

← →
Бегун   (2004-04-23 04:09) [0]

В базе процедур прочитал интерестную статейку

http://delphibase.endimus.ru/?action=viewfunc&topic=vclgeom&id=10402

А как можно чередовать (фон/цвет/фонт(Font)) елементов в TListBox?


← →
Polevi ©   (2004-04-23 08:20) [1]

procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;
 Rect: TRect; State: TOwnerDrawState);
begin
 with TListBox(Control).Canvas do
 begin
   if (Index mod 2)<>0 then
     Brush.Color:=cl3DLight
   else
     Brush.Color:=clWhite;
   Font.Color:=clBlack;
   FillRect(Rect);
   TextOut(Rect.Left + 2, Rect.Top, (Control as TListBox).Items[Index]);
 end;
end;


← →
Бегун   (2004-04-23 14:16) [2]

Не работает :(


← →
clickmaker ©   (2004-04-23 14:46) [3]


> Бегун   (23.04.04 14:16) [2]
> Не работает :(

Не верю. Стиль lbOwnerDrawFixed поставил?


← →
Бегун   (2004-04-23 15:30) [4]

>clickmaker ©   (23.04.04 14:46) [3]

Поставил - заработало.



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

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



Память: 0.45 MB
Время: 0.027 c
4-1075710638
Alexander666
2004-02-02 11:30
2004.04.11
MakeObjectInstance vs. WndProc


1-1080227705
Bazil
2004-03-25 18:15
2004.04.11
Вопрос по QuickReport


7-1080318300
Vadim
2004-03-26 19:25
2004.04.11
Перезагрузка


1-1079902140
GetIt
2004-03-21 23:49
2004.04.11
Excel документ


1-1080113098
cult
2004-03-24 10:24
2004.04.11
OFF: программы для просмотра и сравнения файлов




   Наверх