ISControl.Controls_

Description

This property allows access to any child control by its name or index.

Syntax

object.Controls_(aControlNameOrIndex)

Part Attribute Type Description
object Required
The object always implements the ISControl interface
aControlNameOrIndex In, Required
object
The name or index of the control
Restriction: This property is readonly.

Return Value

ISControl

Example

Display some information about the controls accessed through their index and name.

Dim aControl
Dim aControlInfo


'Access to the child controls through their index  
i = 0
do
  Set aControl = Form.Controls_(CInt(i))

  if not aControl is nothing then
    aControlInfo = aControlInfo & vbNewLine & "------" & vbNewLine &_
      "Caption: " & aControl.Caption & vbNewLine &_ 
      "ShortName: " & aControl.ShortName & vbNewLine &_
      "TypeName: " & aControl.TypeName      
  end if
  
   i = i + 1
loop until aControl is nothing      

'Access to the child control through its name

Set aControl = Form.Controls_("btnDemo") 
 
aControlInfo = aControlInfo & vbNewLine & "------ btnDemo -------" & vbNewLine &_
  "Caption: " & aControl.Caption & vbNewLine &_ 
  "ShortName: " & aControl.ShortName & vbNewLine &_
  "TypeName: " & aControl.TypeName     
 
Profile.MsgBox(aControlInfo)    
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 Maitain > Templates > Health Record Collection Templates > Open the selected form template > Open form editor > Object Inspector.

Version information

Added in v7.8.0