Вниз
Скачать: 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.016 c
4-1179215547
allucard
2007-05-15 11:52
2007.11.25
Поменять обои рабочего стола


2-1193990269
kyn66
2007-11-02 10:57
2007.11.25
TDateEdit глючит?


2-1194188537
Pacific
2007-11-04 18:02
2007.11.25
PosEx


5-1163588751
Poisent
2006-11-15 14:05
2007.11.25
Вопрос о редакторе свойств


2-1193726020
IntruderLab
2007-10-30 09:33
2007.11.25
FastReport 3.0 переменные




   Наверх