Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by toms,
25. Sep 2008
procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
with (Control as TListBox) do
begin
if Index = 2 then
begin //bei best. Zeile soll folgendes gelten
Canvas.Brush.Color := clRed;
Canvas.Font.Color := clYellow;
end else //falls gewünscht
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by toms,
25. Sep 2008
procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
with (Control as TListBox) do
begin
if Index = 2 then //bei best. Zeile soll folgendes gelten
begin
Canvas.Brush.Color := clRed;
Canvas.Pen.Color := clWhite;
end
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by toms,
25. Sep 2008
procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
with (Control as TListBox) do
begin
if Index = 2 then //bei best. Zeile soll folgendes gelten
begin
Canvas.FillRect(Rect);
Canvas.Brush.Color := clRed;
Canvas.Pen.Color := clWhite;