Class Control
Inheritance
| Component | Control 🡄 Component 🡄 Object |
Properties
| Align | Alignment of the control. |
| Caption | The text of a control. |
| ClientHeight | The usable height the control (minus the borders). |
| ClientWidth | The usable width inside the control (minus the borders). |
| Color | The color of the object. |
| Enabled | Determines if the object is usable or greyed out. |
| Font | The font class associated with the control. |
| Height | The height of the control |
| Left | The y position. |
| OnClick | The function to call when a button is pressed. |
| Parent | The owner of this control. |
| PopupMenu | The popup menu that shows when rightclicking the control. |
| Top | The x position. |
| Visible | Determines if the object is visible or not. |
| Width | The width of the control. |
Methods
| bringToFront () | Changes the z-order of the control so it'd at the top. |
| clientToScreen () | Converts control x,y coordinates to screen coordinates. |
| doClick () | Executes the current function under onClick. |
| getAlign ( alignmentoption ) | Gets the alignment of the control. |
| getCaption () | Returns the text of the control. |
| getColor () | Gets the color. |
| getEnabled () | Gets the enabled state of the control. |
| getFont () | Returns the Font object of this object. |
| getHeight () | |
| getLeft () | |
| getOnClick () | Gets the onclick function. |
| getParent () | Returns nil or an object that inherits from the Wincontrol class. |
| getPopupMenu () | |
| getPosition () | Returns the x and y position of the object (relative to the client array of the owner object). |
| getSize () | Gets the size of the control. |
| getTop () | |
| getVisible () | Gets the visible state of the control. |
| getWidth () | |
| repaint () | Invalidates the graphical area of the control and forces and update. |
| screenToClient () | Converts screen x,y coordinates to x,y coordinates on the control. |
| sendToBack () | Changes the z-order of the control so it'd at the back. |
| setAlign ( alignmentoption ) | Sets the alignment of the control. |
| setCaption ( caption ) | Sets the text on a control. |
| setColor ( rgb ) | Sets the color. |
| setEnabled ( enabled ) | Sets the enabled state of the control. |
| setFont () | Assigns a new font object. |
| setHeight () | |
| setLeft ( left ) | |
| setOnClick ( functionnameorstring ) | Sets the onclick routine. |
| setParent ( wincontrol ) | Sets the parent for this control. |
| setPopupMenu () | |
| setPosition ( x, y ) | Sets the x and y position of the object base don the top left position (relative to the client array of the owner object). |
| setSize ( width, height ) | Sets the width and height of the control. |
| setTop ( top ) | |
| setVisible ( visible ) | Sets the visible state of the control. |
| setWidth ( width ) | |
| update () | Only updates the invalidated areas. |
Inheritance
Properties
- Align
-
Alignment of the control.
Type:
AlignmentOption - Caption
-
The text of a control.
Type:
- ClientHeight
-
The usable height the control (minus the borders).
Type:
integer - ClientWidth
-
The usable width inside the control (minus the borders).
Type:
integer - Color
-
The color of the object. Does not affect the caption.
Type:
ColorDefinition/RGBInteger - Enabled
-
Determines if the object is usable or greyed out.
Type:
boolean - Font
-
The font class associated with the control.
Type:
- Height
-
The height of the control
Type:
integer - Left
-
The y position.
Type:
integer - OnClick
-
The function to call when a button is pressed.
Type:
function - Parent
-
The owner of this control.
Type:
- PopupMenu
-
The popup menu that shows when rightclicking the control.
Type:
- Top
-
The x position.
Type:
integer - Visible
-
Determines if the object is visible or not.
Type:
boolean - Width
-
The width of the control.
Type:
integer
Methods
- bringToFront ()
- Changes the z-order of the control so it'd at the top.
- clientToScreen ()
- Converts control x,y coordinates to screen coordinates.
- doClick ()
- Executes the current function under onClick.
- getAlign ( alignmentoption )
-
Gets the alignment of the control.
Parameters:
- alignmentoption
- getCaption ()
-
Returns the text of the control.
Returns:
- getColor ()
- Gets the color.
- getEnabled ()
- Gets the enabled state of the control.
- getFont ()
-
Returns the Font object of this object.
Returns:
-
Font
font
- getHeight ()
- getLeft ()
- getOnClick ()
- Gets the onclick function.
- getParent ()
- Returns nil or an object that inherits from the Wincontrol class.
- getPopupMenu ()
- getPosition ()
- Returns the x and y position of the object (relative to the client array of the owner object).
- getSize ()
- Gets the size of the control.
- getTop ()
- getVisible ()
- Gets the visible state of the control.
- getWidth ()
- repaint ()
- Invalidates the graphical area of the control and forces and update.
- screenToClient ()
- Converts screen x,y coordinates to x,y coordinates on the control.
- sendToBack ()
- Changes the z-order of the control so it'd at the back.
- setAlign ( alignmentoption )
-
Sets the alignment of the control.
Parameters:
- alignmentoption
- setCaption ( caption )
-
Sets the text on a control.
All the GUI objects fall in this category.
Parameters:
- caption string
- setColor ( rgb )
-
Sets the color.
Parameters:
- rgb
- setEnabled ( enabled )
-
Sets the enabled state of the control.
Parameters:
- enabled boolean
- setFont ()
- Assigns a new font object. (Not recommended to use. Change the font object that's already there if you wish to change fonts).
- setHeight ()
- setLeft ( left )
-
Parameters:
- left int
- setOnClick ( functionnameorstring )
-
Sets the onclick routine.
Parameters:
- functionnameorstring
- setParent ( wincontrol )
-
Sets the parent for this control.
Parameters:
- wincontrol
- setPopupMenu ()
- setPosition ( x, y )
-
Sets the x and y position of the object base don the top left position (relative to the client array of the owner object).
Parameters:
- x int
- y int
- setSize ( width, height )
-
Sets the width and height of the control.
Parameters:
- width int
- height int
- setTop ( top )
-
Parameters:
- top int
- setVisible ( visible )
-
Sets the visible state of the control.
Parameters:
- visible boolean
- setWidth ( width )
-
Parameters:
- width int
- update ()
- Only updates the invalidated areas.