Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.11.25;
Скачать: 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 вся ветка

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

Наверх




Память: 0.46 MB
Время: 0.014 c
2-1193900960
Darvin
2007-11-01 10:09
2007.11.25
Перехват OnMouseWheel в DrawGrid


15-1193131824
GEN++
2007-10-23 13:30
2007.11.25
Кто работал с Windows CE


15-1192724934
Ученик
2007-10-18 20:28
2007.11.25
Как переустановить ipaq file store?


2-1193743022
Reni
2007-10-30 14:17
2007.11.25
tmemorystream-> string?


15-1193139603
oldman
2007-10-23 15:40
2007.11.25
MTV RUS позорит страну (оффтоп, но все таки)!