选择复选按钮不激发OnClick
procedure CheckNoClick(CB: TCheckBox; CheckIt: Boolean);
begin
CB.Perform(BM_SETCHECK, Ord(CheckIt), 0);
end;
Using this procedure, the code for checking a TComboBox
called ComboBox1 looks like this:
CheckNoClick(ComboBox1, True);