controlCount

controlCount(): Integer;

The controlCount method of the Form class returns the number of controls on the form.

The following example examines all controls on a form.

vars
    cntrl : Control;
    indx  : Integer;
begin
    foreach indx in 1 to controlCount do
        cntrl := controls(indx);
        if cntrl.name = "Text1" then
            ...
        endif;
    endforeach;
end;