The Controls object allows you to add, move and interact with controls.
AddButton
Controls.AddButton(caption, left, top)
Adds a button to the graphics window with the specified width and height.
caption
The caption to display in the button.
left
The x co-ordinate of the button.
top
The y co-ordinate of the button.
Returns
The button that was just added to the Graphics Window.
GetButtonCaption
Controls.GetButtonCaption(buttonName)
Gets the curent caption of the specified button.
buttonName
The Button whose caption is requested.
Returns
The current caption of the button.
SetButtonCaption
Controls.SetButtonCaption(buttonName, caption)
Sets the caption of the specified button.
buttonName
The Button whose caption needs to be set.
caption
The new caption for the button.
Returns
Nothing
AddTextBox
Controls.AddTextBox(left, top)
Adds a text input box to the graphics window with the specified width and height.
left
The x co-ordinate of the text box.
top
The y co-ordinate of the text box.
Returns
The text box that was just added to the Graphics Window.
AddMultiLineTextBox
Controls.AddMultiLineTextBox(left, top)
Adds a multi-line text input box to the graphics window with the specified width and height.
left
The x co-ordinate of the text box.
top
The y co-ordinate of the text box.
Returns
The text box that was just added to the Graphics Window.
GetTextBoxText
Controls.GetTextBoxText(textBoxName)
Gets the curent text of the specified TextBox.
textBoxName
The TextBox whose text is requested.
Returns
The text in the TextBox
SetTextBoxText
Controls.SetTextBoxText(textBoxName, text)
Sets the text of the specified TextBox.
textBoxName
The TextBox whose text needs to be set.
text
The new text for the TextBox.
Returns
Nothing
Remove
Controls.Remove(controlName)
Removes a control from the Graphics Window.
controlName
The name of the control that needs to be removed.
Returns
Nothing
Move
Controls.Move(control, x, y)
Moves the control with the specified name to a new position.
control
The name of the control to move.
x
The x co-ordinate of the new position.
y
The y co-ordinate of the new position.
Returns
Nothing
SetSize
Controls.SetSize(control, width, height)
Sets the size of the control.
control
The name of the control to be resized.
width
The width of the control.
height
The height of the control.
Returns
Nothing
HideControl
Controls.HideControl(controlName)
Hides an already added control.
controlName
The name of the control.
Returns
Nothing
ShowControl
Controls.ShowControl(controlName)
Shows a previously hidden control.
controlName
The name of the control.
Returns
Nothing