Let any such checkbox point to code like below:
procedure TForm1.CheckBox1Change(Sender: TObject);
begin
if sender is TCheckbox then
begin
if TCheckbox(sender).Checked then
inc(attrib_count)
else
dec(attrib_count);
end;
end;
Let anyprocedure TForm1.CheckBox1Change(Sender: TObject);
И именно эту процедуру задайте каждому компоненту CheckBox. Не дублируйте!
Events -> OnChange -> выбрать нужную процедуру.
Eng:And it is this procedure that you set for each CheckBox component. Don't duplicate!
Events -> OnChange -> select the desired procedure.