Einzelnen Beitrag anzeigen

100nF

Registriert seit: 7. Nov 2004
639 Beiträge
 
#12

Re: Listbox Eintrag fett machen

  Alt 4. Aug 2005, 19:35
probiers mal so:
Delphi-Quellcode:
procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;
  Rect: TRect; State: TOwnerDrawState);
var i, i2, iihnhalt: integer;
begin
with (Control as TListBox).Canvas do
begin
  FillRect(rect);
  Font.Style:= [];
  TextOut(Rect.Left+2, Rect.Top, listbox1.Items[index]);
  for i:= 0 to listbox2.Count-1 do
  begin
   iihnhalt:= strtoint(listbox2.Items[i]);
   If Index = iihnhalt then
   begin
    FillRect(rect);
    Font.Style:= [fsbold];
    TextOut(Rect.Left+2, Rect.Top, listbox1.Items[index]);
   end ;
  end;
end;
end;
  Mit Zitat antworten Zitat