Einzelnen Beitrag anzeigen

freak24
(Gast)

n/a Beiträge
 
#3

Re: Text von Auswahlfeld der Combobox einfärben

  Alt 29. Jul 2005, 10:45
Das sieht ungefähr so aus
Delphi-Quellcode:
procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer;
  Rect: TRect; State: TOwnerDrawState);
begin
 if Kriterium then
  Combobox1.Canvas.Font.Color := clBlue
 else
  Combobox1.Canvas.Font.Color := Combobox1.font.color;
 Combobox1.Canvas.FillRect(rect);
 combobox1.Canvas.TextOut(rect.Left,rect.Top,combobox1.Items.Strings[index])
end;
  Mit Zitat antworten Zitat