从源码里抄袭一段CheckListBox的OnMouseDown ——
procedure TForm1.CheckListBox1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
const
DisableId: Integer = 1;//不设ItemEnabled,自己决定哪一项只读,这里假定是第二项
var
nIndex: Integer;
begin
inherited;
if Button = mbLeft then
with CheckListBox1 do begin
nIndex := ItemAtPos(Point(X, Y), True);
if nIndex = DisableId then Checked[nIndex] := not Checked[nIndex];
end;
end;