From Cheat Engine
Revision as of 20:55, 24 January 2018 by TheyCallMeTim13 (talk | contribs) (Undo revision 5662 by TheyCallMeTim13 (Talk))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Control class: (Inheritance: Component->Object)

Base class for gui controls.


Caption : string
The text of a control.
Top : integer
The x position.
Left : integer
The y position.
Width : integer
The width of the control.
Height : integer
The height of the control.
ClientWidth : integer
The usable width inside the control (minus the borders).
ClientHeight : integer
The usable height the control (minus the borders).
Align : AlignmentOption
Alignment of the control.
Enabled : boolean
Determines if the object is usable or greyed out.
Visible : boolean
Determines if the object is visible or not.
Color : ColorDefinition/RGBInteger
The color of the object. Does not affect the caption.
Parent : WinControl
The owner of this control.
PopupMenu : PopupMenu
The popup menu that shows when rightclicking the control.
Font : Font
The font class associated with the control.
OnClick : function
The function to call when a button is pressed.


getLeft() : integer
Returns the left position.
Sets the left position.
getTop() : integer
Returns the top position.
Sets the top position.
getWidth() : integer
Returns the width.
Sets the width.
getHeight() : integer
Returns the height.
Sets the height.
Sets the text on a control. All the gui objects fall in this category.
getCaption() : string
Returns the text of the control
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)
getPosition() : (integer, integer)
Returns the x and y position of the object (relative to the client array of the owner object)
setSize(width, height)
Sets the width and height of the control
getSize() : (integer, integer)
Gets the size of the control
sets the alignment of the control.
gets the alignment of the control.
getEnabled() : boolean
gets the enabled state of the control.
Sets the enabled state of the control.
getVisible() : boolean
gets the visible state of the control.
sets the visible state of the control.
getColor() : integer
gets the color.
Sets the color.
getParent() : WinControl
Returns nil or an object that inherits from the WinControl class.
Sets the parent for this control.
getPopupMenu() : Menu
Returns the pop up menu.
Sets the pop up menu.
getFont() : Font
Returns the Font object of this object.
Assigns a new font object. (Not recommended to use. Change the font object that's already there if you wish to change fonts).
Invalidates the graphical area of the control and forces and update.
Only updates the invalidated areas.
Sets the onclick routine.
getOnClick() : function
Gets the onclick function.
Executes the current function under onClick.

See also[edit]

Related Functions[edit]

Related Classes[edit]