ISProfileForm.AllControls

Description

This property contains the list of all child controls of the form.

Syntax

object.AllControls

Part Attribute Type Description
object Required
The object always implements the ISProfileForm interface
Restriction: This property is readonly.

Return Value

ISControls

Example

Display the list of all child controls of the form and some information about them.

sub main()
  Dim aForm
  Dim aControl, aAllControls
  Dim aMessage

  Set aForm = Profile.Form
  set aAllControls =  aForm.AllControls
  
  aMessage = "The number of the form controls is  " &  aAllControls.Count
  for each aControl in aAllControls
    aMessage = aMessage & vbNewLine & GetControlInfo(aControl) &_
      vbNewLine & " ---------- "
  next                  
 
  Profile.MsgBox(aMessage)
end sub

function GetControlInfo(aControl)
  Dim aControlInfo
  
  aControlInfo =_
    "TypeName: " & aControl.TypeName & vbNewLine &_ 
    "Width: " & aControl.Width & vbNewLine &_
    "Height: " & aControl.Height & vbNewLine &_
    "Hint: " & aControl.Hint & vbNewLine &_
    "Left: " & aControl.Left & vbNewLine &_
    "Top: " & aControl.Top & vbNewLine &_
    "Tag: " & aControl.Tag & vbNewLine &_
    "ShortName: " & aControl.ShortName & vbNewLine &_
    "Enabled: " & aControl.Enabled & vbNewLine &_
    "Caption: " & aControl.Caption
  GetControlInfo = aControlInfo   
end function  
Note: This macro should be executed in any event handler of the form control.

In Profile Client v8 on User Interface Controls can be found in Maintain > Templates > Health Record Collection Templates > Open the selected form template > Open form editor > Object Inspector.

Version information

Added in v7.8.0