본문 바로가기

Development/Delphi

자식컨트롤 특정 클래스타입 찾기

var
  i, checkedCount: Integer; 
begin
  for i:=0 to GBMultiUpdate.ControlCount-1 do
  begin
    if TComponent(GBMultiUpdate.Controls[i]).ClassType = TCheckBox then
      if (GBMultiUpdate.Controls[i] as TCheckBox).Checked then
        Inc(checkedCount);
  end;
end;