Registriert seit: 7. Nov 2004
639 Beiträge
|
Re: Listbox Eintrag fett machen
4. Aug 2005, 20: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;
|
|
Zitat
|