Put all checkboxes in a TList and run thru it.
Code:
TList checkboxes = new TList()
TCheckbox cb;
for (int i=0; i<10; ++i) {
cb = new TCheckBox();
checkboxes->ad(cb);
}
for (int i=0; i<10; ++i) {
cb = (TCheckBox)checkboxes->get(i);
cb->Checked = true;
}