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

Шрифт в ListBox е   Найти похожие ветки 

 
Washington ©   (2007-10-30 15:02) [0]

Как сделать, чтобы при щелчке на ListBox"e шрифт выделенного элемента менялся?


 
Джо ©   (2007-10-30 15:18) [1]

Style := lbOwnerDrawFixed

И в обработчике OnDrawItem:

begin
 with TListBox(Control).Canvas do
 begin
   if odSelected in State then
   begin
     Brush.Color := clActiveCaption;
     Font.Color := clHighlightText;
     Font.Name := "Arial"
   end
   else
   begin
     Brush.Color := clWindow;
     Font.Color := clWindowText;
     Font.Name := "Times New Roman"      
   end;
   ListBox1.Canvas. FillRect (Rect);

   TextOut(Rect.Left,Rect.Top,TListBox(Control).Items[Index]);
 end;
end;



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

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



Память: 0.44 MB
Время: 0.02 c
1-1189078540
den303_work
2007-09-06 15:35
2007.11.25
Создать контрол с заранее неизвестным классом


15-1192716641
Delphi User
2007-10-18 18:10
2007.11.25
Каким фаерволом вы пользуетесь ? Outpost слишком тяжелый.


8-1170069211
T54
2007-01-29 14:13
2007.11.25
Видео


2-1194128657
SveTTT
2007-11-04 01:24
2007.11.25
Где ошибка?


15-1193402767
Alien1769
2007-10-26 16:46
2007.11.25
Работа с модемом




   Наверх