Registriert seit: 11. Nov 2003
Ort: Oldenburg
1.446 Beiträge
Delphi 10.2 Tokyo Enterprise
|
Re: Check List Box einfärben
7. Jul 2004, 15:28
Versuch mal
Code:
procedure Tfrm_lagerverwaltung.cblb_statusinfoDrawItem(
Control: TWinControl; Index: Integer; Rect: TRect;
State: TOwnerDrawState);
var i : integer;
begin
if (cblb_statusinfo.Checked[Index]) then
begin
cblb_statusinfo.Canvas.Brush.Color := clRed;
cblb_statusinfo.Canvas.Brush.Style := bsSolid;
cblb_statusinfo.Canvas.FillRect(Rect);
cblb_statusinfo.Canvas.TextOut(Rect.Left, Rect.Top, cblb_statusinfo.Items[Index]);
end
else
begin
cblb_statusinfo.Canvas.TextOut(Rect.Left, Rect.Top, cblb_statusinfo.Items[Index]);
end;
end;
Frank Tux sein Lieblingsquellcode
While anzfische<TuxSatt do begin
Fisch:=TFisch.Create; Tux.EssenFisch(Fisch); Fisch.Free;inc(anzfische); end;
|