Board index » delphi » Listbox question

Listbox question

i need to know how to make several lines (items) of listbox bold, but
not all of them.
i use delphi 3 pro.

tia,
  Ales

 

Re:Listbox question


Quote
"Ale? Hotko" <ales.ho...@uni-mb.si> wrote:
>i need to know how to make several lines (items) of listbox bold, but
>not all of them.
>i use delphi 3 pro.

Set the Style property of the listbox to OwnerDrawFixed and in the
OnDrawItem event you can write something like this:

with TListBox(Control).Canvas do begin
        FillRect(Rect);
        Font.Style := fsBold;
        TextOut(Rect.Left, Rect.Top, ListBox1.Items[Index];
end;

(I'm sorry if I put something wrong, I was writing from my memory)

Smola
--
My ass is on fire

Other Threads