Control

Controls are elements of the graphical user interface that are included in a form.

Variables of the Type Control refer to a Control object. Control objects are a container for the different subtypes of controls. The Object property of the Control object can be used to determine a reference to the subtype.

Example:

 

Dim c As Control, B As TCEButtons.Button

 

c := F1.ControlByPath("Frame1/Button2")

 

MsgBox c.Width

 

B := c.Object

 

MsgBox B.Text

 

The example uses the ControlByPath function to determine a control with its name in the form.The return of the function is a reference to a Control object that represents the container for the button. The Control object manages positioning, among other properties. This can now be output. For the properties of the button, a refernence to the button itself is required. This reference is determined by the Object property. By assigning the Object property to a typed pointer (here TCEButtons.Button) the property Text can then be determined.