Liegt an Deinem With ... die Checklistbox hat auch State
property State[Index: Integer]: TCheckBoxState read GetState write SetState;
einfach den Parameter umbenennen
Delphi-Quellcode:
procedure TForm2.CheckListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; aState: TOwnerDrawState);
begin
with (Control as TCheckListBox) do
begin
if odSelected in aState then
begin
end;
end;
end;