/ Forums / Advansys Formativ / Creating Solutions with Formativ / Get Type of Control on Designed Form / Reply To: Get Type of Control on Designed Form

#8135
Support 1
Participant

Thanks for your question.

You can use the following sample code to enumerate the Components and Controls arrays on a form. Note that a Component may also be a Control.

  Utilities.Trace "MainForm.ComponentCount = " & MainForm.ComponentCount
  for I = 0 to MainForm.ComponentCount - 1
    Utilities.Trace I & " = " & MainForm.Components(I).ClassName
  next

  Utilities.Trace "MainForm.ControlCount = " & MainForm.ControlCount
  for I = 0 to MainForm.ControlCount - 1
    Utilities.Trace I & " = " & MainForm.Controls(I).ClassName
  next

I hope this helps you.

Regards,
Advansys Support