Skip to content

guicontrol: members

124 implemented, 0 reserved. Entries are sorted by name.

guicontrol.acceptdropfiles: boolean

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Kept for scripts. Borne never hands dropped files to a script, so it changes nothing.

Ctrl.acceptdropfiles = true;

Specification: gui.md§2.6.

guicontrol.active: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Whether the control reacts to the mouse and keyboard.

new GuiControl("MyControl") { active = true; }

Specification: gui.md§2.2.

guicontrol.addcontrol(control: object) -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Makes the control the last child of this one; a control that had another parent leaves it. Adding a control to itself or to one of its descendants reports R-GUI-PARENT.

MainWindow.addControl(MyButton);

Specification: gui.md§2.4.

guicontrol.alpha: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Opacity from 0 to 1; it also applies to the children.

new GuiControl("MyControl") { alpha = 0.5; }

Specification: gui.md§2.2.

guicontrol.areaclickpriority: number

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Touch-screen click priority; kept for scripts and without effect on a desktop.

Ctrl.areaclickpriority = 1;

Specification: gui.md§2.6.

guicontrol.awake: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).

new GuiBitmapBorderCtrl("MyControl") { awake = 1; }

Specification: gui.md§3.

guicontrol.bitmapcache: boolean

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Hint that the control and its children may be drawn from a cached picture; kept for scripts.

Ctrl.bitmapcache = true;

Specification: gui.md§2.6.

guicontrol.blue: number

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Blue part of the control tint, from 0 to 1.

Ctrl.blue = 0.5;

Specification: gui.md§2.6.

guicontrol.bounds: array

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Position and size in one array: x, y, width, height. Writing it moves and resizes.

Ctrl.bounds = {10, 10, 200, 100};

Specification: gui.md§2.6.

guicontrol.bringtofront() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Draws the control above its siblings.

MainWindow.bringToFront();

Specification: gui.md§2.4.

guicontrol.canmove: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Whether the player can drag the control.

new GuiControl("MyControl") { canmove = true; }

Specification: gui.md§2.2.

guicontrol.canresize: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Whether the player can resize the control from its corner.

new GuiControl("MyControl") { canresize = true; }

Specification: gui.md§2.2.

guicontrol.catchevent(target: any, event: string, callback: string) -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Routes an event of a control to a function of the object it is called on; the control comes first among the arguments of the function.

thiso.catchevent(this.name, "onAction", "onClose");

Specification: gui.md§6.3.

guicontrol.clearcontrols() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Destroys every child of this control.

MainWindow.clearControls();

Specification: gui.md§2.4.

guicontrol.clientextent: array

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

The client area size as “width height”.

new GuiControl("MyControl") { clientextent = {0, 0, 10, 10}; }

Specification: gui.md§3.

guicontrol.clientheight: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Height of the client area: a window’s height without its title bar.

new GuiControl("MyControl") { clientheight = 10; }

Specification: gui.md§3.

guicontrol.clientwidth: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Width of the client area: the width without the title bar or frame of a window.

new GuiControl("MyControl") { clientwidth = 10; }

Specification: gui.md§3.

guicontrol.clipchildren: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Whether children are cut at the edges of the control.

new GuiControl("MyControl") { clipchildren = true; }

Specification: gui.md§2.2.

guicontrol.clipmove: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Whether dragging keeps the control inside its parent.

new GuiControl("MyControl") { clipmove = true; }

Specification: gui.md§2.2.

guicontrol.cliptobounds: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Whether the control is cut at the edges of its parent.

new GuiControl("MyControl") { cliptobounds = true; }

Specification: gui.md§2.2.

guicontrol.color: array

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

The tint and opacity in one array of four values from 0 to 255: red, green, blue, alpha.

Ctrl.color = {255, 128, 0, 255};

Specification: gui.md§2.6.

guicontrol.controls: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

The child controls, as an array. Read-only.

echo(MyControl.controls);

Specification: gui.md§2.3.

guicontrol.createanimation() -> guianimation

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Makes a transition object for the control. Set its transition and duration; it starts at once and shows the control.

anim = Ctrl.createAnimation();
anim.transition = "fadein";
anim.duration = 0.5;

Specification: gui.md§2.6.

guicontrol.cursor: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Pointer shape over the control: default, text, pointer, crosshair, col-resize, row-resize, progress, wait, help or drag; hand is stored as pointer and any other name as default.

new GuiButtonCtrl("MyButton") { cursor = "pointer"; }

Specification: gui-legacy.md§26.1.

guicontrol.destroy()

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Destroys the control and its children; onRemove runs on the way out.

MyWindow.destroy();

Specification: gui.md§2.4.

guicontrol.editing: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Whether the control is in editing mode.

new GuiControl("MyControl") { editing = true; }

Specification: gui.md§2.2.

guicontrol.extent: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Size as “width height” or {width, height}.

new GuiControl("MyControl") { extent = "200 100"; }

Specification: gui.md§2.1.

guicontrol.fastchildrender: boolean

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Hint that bitmap children may use a faster drawing path; kept for scripts.

Ctrl.fastchildrender = true;

Specification: gui.md§2.6.

guicontrol.findcontrol(arg1: string) -> guicontrol

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Returns the control under a point given in the coordinates of this control, or nothing.

Control.findcontrol("");

Specification: gui.md§3.

guicontrol.findobject(name: string) -> guicontrol

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Finds a descendant of this control by name; the control itself and other controls do not count.

temp.b = MainWindow.findObject("MainButton");

Specification: gui.md§2.4.

guicontrol.firstresponder: guicontrol

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

The control inside this one that has the keyboard focus, or empty. Writing a control inside gives it the focus.

echo(Window.firstresponder.name);

Specification: gui.md§2.6.

guicontrol.flickerbasetime: number

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Shifts the phase of flickering by this many seconds, so controls with one flickertime blink apart.

Ctrl.flickerbasetime = random(0, 1);

Specification: gui.md§2.6.

guicontrol.flickering: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Whether the control blinks.

new GuiControl("MyControl") { flickering = true; }

Specification: gui.md§2.2.

guicontrol.flickertime: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Seconds between blinks while flickering.

new GuiControl("MyControl") { flickertime = 0.25; }

Specification: gui.md§2.2.

guicontrol.getparent() -> guicontrol

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

The parent control, or empty for the root canvas.

echo(Inner.getParent().name);

Specification: gui.md§2.4.

guicontrol.getroot() -> guicontrol

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

The root canvas GuiRoot.

echo(Inner.getRoot().name);

Specification: gui.md§2.4.

guicontrol.globaltolocalcoord(x: number, y: number) -> array

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Converts a point of the screen to a point relative to this control, as {x, y}.

temp.p = Button.globalToLocalCoord(100, 50);

Specification: gui.md§2.4.

guicontrol.green: number

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Green part of the control tint, from 0 to 1.

Ctrl.green = 0.5;

Specification: gui.md§2.6.

guicontrol.height: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Height in pixels.

new GuiControl("MyControl") { height = 10; }

Specification: gui.md§2.1.

guicontrol.hide() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Hides the control and its children and raises onHide when it was visible.

MainWindow.hide();

Specification: gui.md§2.4.

guicontrol.hint: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Tooltip text shown when the pointer rests on the control.

new GuiControl("MyControl") { hint = "Hello"; }

Specification: gui.md§2.2.

guicontrol.hinttime: number

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Seconds the pointer must rest on the control before its hint shows; 0.5 by default.

Ctrl.hinttime = 1;

Specification: gui.md§2.6.

guicontrol.horizsizing: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

How the control follows a parent that changes width: right, left, center, width or relative.

new GuiControl("MyControl") { horizsizing = "width"; }

Specification: gui.md§2.1.

guicontrol.id: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

Engine identifier of the control. Read-only.

echo(MyControl.id);

Specification: gui.md§1.1.

guicontrol.isactuallyvisible() -> boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Returns true when the control and all its parents are visible.

Control.isactuallyvisible();

Specification: gui.md§3.

guicontrol.isfirstresponder() -> boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

True while the control has the keyboard focus.

echo(Edit.isFirstResponder());

Specification: gui.md§2.4.

guicontrol.isinanimation: boolean

Runs on: client only. Origin: compatibility. Since: M14. Playground: no. read-only.

True while the control runs a transition made with createAnimation.

echo(Ctrl.isinanimation);

Specification: gui.md§2.6.

guicontrol.isininoutanimation: boolean

Runs on: client only. Origin: compatibility. Since: M14. Playground: no. read-only.

True while the control runs a transition that shows or hides it.

echo(Ctrl.isininoutanimation);

Specification: gui.md§2.6.

guicontrol.ismouselocked(arg1: number) -> boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Returns true when the mouse is locked to this control.

Control.ismouselocked(0);

Specification: gui.md§3.

guicontrol.layer: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).

new GuiBitmapBorderCtrl("MyControl") { layer = 1; }

Specification: gui.md§3.

guicontrol.localtoglobalcoord(x: number, y: number) -> array

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Converts a point relative to this control to a point of the screen, as {x, y}.

temp.p = Button.localToGlobalCoord(1, 1);

Specification: gui.md§2.4.

guicontrol.lockmousedown: boolean

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

When true a press on the control belongs to it and it keeps the mouse until the button is released.

Ctrl.lockmousedown = true;

Specification: gui.md§2.6.

guicontrol.makefirstresponder(on: boolean) -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Gives the control the keyboard focus, or takes it away when the value is false.

Edit.makeFirstResponder(true);

Specification: gui.md§2.4.

guicontrol.minextent: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Smallest size the player can resize the control to, as “width height”.

new GuiControl("MyControl") { minextent = "50 30"; }

Specification: gui.md§2.1.

guicontrol.minsize: string

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Another name of minextent: the least size the control can be resized to.

Ctrl.minsize = "50 30";

Specification: gui.md§2.6.

guicontrol.mode: number

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

How a bitmap control blends with what is below: 0 add, 1 transparent, 2 subtract, 3 day and night.

Ctrl.mode = 0;

Specification: gui.md§2.6.

guicontrol.mouselock(arg1: number) -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Keeps the mouse on this control until it is unlocked or the button goes up.

Control.mouselock(0);

Specification: gui.md§3.

guicontrol.mouseunlock(arg1: number) -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Lets the mouse go again.

Control.mouseunlock(0);

Specification: gui.md§3.

guicontrol.mouseunlockall() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Lets every locked mouse go.

Control.mouseunlockall();

Specification: gui.md§3.

guicontrol.name: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

The name given when the control was created. Read-only.

echo(MyControl.name);

Specification: gui.md§1.1.

guicontrol.onAction()

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised by the main action of a control: a button click, Enter in a text edit, a changed slider or check box value.

function MyControl.onAction() {
echo("onAction");
}

Specification: gui.md§2.5.

guicontrol.onAdd()

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised on a control when it is added to a parent.

function MyControl.onAdd() {
echo("onAdd");
}

Specification: gui.md§2.5.

guicontrol.onAnimationFinished(transition: string)

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Raised when the last transition of the control ends on its own, with the name of the transition.

function MyControl.onAnimationFinished(name) {
echo(name);
}

Specification: gui.md§3.13.

guicontrol.onBecomeFirstResponder()

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Raised when the control gets the keyboard focus.

function MyControl.onBecomeFirstResponder() {
echo("focus");
}

Specification: gui.md§3.13.

guicontrol.onDefaultStyleChanges(style: string)

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Raised on the root canvas when the default GUI style is changed in the options.

function GuiRoot.onDefaultStyleChanges(style) {
echo(style);
}

Specification: gui.md§3.13.

guicontrol.onDialogPop()

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when the modal dialog of the control closes.

function MyControl.onDialogPop() {
echo("onDialogPop");
}

Specification: gui.md§2.5.

guicontrol.onDialogPush()

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when the control is shown as a modal dialog.

function MyControl.onDialogPush() {
echo("onDialogPush");
}

Specification: gui.md§2.5.

guicontrol.onFirstResponderChanges(control: any)

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Raised on the root canvas whenever the keyboard focus moves, with the control that has it now.

function GuiRoot.onFirstResponderChanges(ctrl) {
echo(ctrl.name);
}

Specification: gui.md§3.13.

guicontrol.onHide()

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when a visible control is hidden.

function MyControl.onHide() {
echo("onHide");
}

Specification: gui.md§2.5.

guicontrol.onKeyDown(keycode: number, key: string, modifiers: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised on the focused control when a key goes down.

function MyControl.onKeyDown(code, key, mods) {
echo("onKeyDown");
}

Specification: gui.md§2.5.

guicontrol.onKeyUp(keycode: number, key: string, modifiers: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised on the focused control when a key goes up.

function MyControl.onKeyUp(code, key, mods) {
echo("onKeyUp");
}

Specification: gui.md§2.5.

guicontrol.onLoseFirstResponder()

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Raised when the control loses the keyboard focus.

function MyControl.onLoseFirstResponder() {
echo("blur");
}

Specification: gui.md§3.13.

guicontrol.onMouseDown(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when the left button goes down over the control, with the modifier keys, the position and the click count.

function MyControl.onMouseDown(mods, x, y, clicks, pointer) {
echo("onMouseDown");
}

Specification: gui.md§2.5.

guicontrol.onMouseDragged(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when the cursor moves while the left button pressed on the control is held.

function MyControl.onMouseDragged(mods, x, y, clicks, pointer) {
echo("onMouseDragged");
}

Specification: gui.md§2.5.

guicontrol.onMouseEnter(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when the cursor moves onto the control.

function MyControl.onMouseEnter(mods, x, y, clicks, pointer) {
echo("onMouseEnter");
}

Specification: gui.md§2.5.

guicontrol.onMouseLeave(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when the cursor leaves the control.

function MyControl.onMouseLeave(mods, x, y, clicks, pointer) {
echo("onMouseLeave");
}

Specification: gui.md§2.5.

guicontrol.onMouseMove(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when the cursor moves over the control with no button held.

function MyControl.onMouseMove(mods, x, y, clicks, pointer) {
echo("onMouseMove");
}

Specification: gui.md§2.5.

guicontrol.onMouseUp(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when the left button goes up after a press on the control.

function MyControl.onMouseUp(mods, x, y, clicks, pointer) {
echo("onMouseUp");
}

Specification: gui.md§2.5.

guicontrol.onMouseWheelDown(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised once per wheel step turned down over the control.

function MyControl.onMouseWheelDown(mods, x, y, clicks, pointer) {
echo("onMouseWheelDown");
}

Specification: gui.md§2.5.

guicontrol.onMouseWheelUp(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised once per wheel step turned up over the control.

function MyControl.onMouseWheelUp(mods, x, y, clicks, pointer) {
echo("onMouseWheelUp");
}

Specification: gui.md§2.5.

guicontrol.onMove(x: number, y: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised after the position of the control changed, with the new position.

function MyControl.onMove() {
echo("onMove");
}

Specification: gui.md§2.5.

guicontrol.onRemove()

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised on a control when it is taken out of its parent.

function MyControl.onRemove() {
echo("onRemove");
}

Specification: gui.md§2.5.

guicontrol.onResize(width: number, height: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised after the size of the control changed, with the new width and height.

function MyControl.onResize(w, h) {
echo("onResize");
}

Specification: gui.md§2.5.

guicontrol.onRightMouseDown(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when the right button goes down over the control.

function MyControl.onRightMouseDown(mods, x, y, clicks, pointer) {
echo("onRightMouseDown");
}

Specification: gui.md§2.5.

guicontrol.onRightMouseDragged(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when the cursor moves while the right button is held.

function MyControl.onRightMouseDragged(mods, x, y, clicks, pointer) {
echo("onRightMouseDragged");
}

Specification: gui.md§2.5.

guicontrol.onRightMouseUp(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when the right button goes up after a press on the control.

function MyControl.onRightMouseUp(mods, x, y, clicks, pointer) {
echo("onRightMouseUp");
}

Specification: gui.md§2.5.

guicontrol.onShow()

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when a hidden control becomes visible.

function MyControl.onShow() {
echo("onShow");
}

Specification: gui.md§2.5.

guicontrol.onSleep()

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when a control stops being part of the shown tree.

function MyControl.onSleep() {
echo("onSleep");
}

Specification: gui.md§2.5.

guicontrol.onStartDrag()

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Raised when the player starts moving or resizing the control with the mouse.

function MyControl.onStartDrag() {
echo("drag");
}

Specification: gui.md§3.13.

guicontrol.onStopDrag(modifiers: number, x: number, y: number, clicks: number, pointer: number)

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Raised when the player lets go of a control being moved or resized.

function MyControl.onStopDrag(mods, x, y, clicks, pointer) {
echo("onStopDrag");
}

Specification: gui.md§3.13.

guicontrol.onStyleChanges(style: string)

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Raised when the style of the control was set to a different value, with the new style name.

function MyControl.onStyleChanges(style) {
echo(style);
}

Specification: gui.md§3.13.

guicontrol.onWake()

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when a control becomes part of the shown tree (it and all its parents visible).

function MyControl.onWake() {
echo("onWake");
}

Specification: gui.md§2.5.

guicontrol.parent: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

The parent control. Read-only.

echo(MyControl.parent);

Specification: gui.md§2.3.

guicontrol.position: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Position as “x y” or {x, y}.

new GuiControl("MyControl") { position = "10 20"; }

Specification: gui.md§2.1.

guicontrol.profile: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

The profile that styles the control, by name or object.

new GuiControl("MyControl") { profile = "MyProfile"; }

Specification: gui.md§2.3.

guicontrol.pushtoback() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Draws the control below its siblings.

Backdrop.pushToBack();

Specification: gui.md§2.4.

guicontrol.red: number

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Red part of the control tint, from 0 to 1.

Ctrl.red = 0.5;

Specification: gui.md§2.6.

guicontrol.reflow() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Lays out the control and its children again at once.

List.reflow();

Specification: gui.md§2.4.

guicontrol.removecontrol(control: object) -> boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Takes a child out of this control. The child keeps existing without a parent.

MainWindow.removeControl(MyButton);

Specification: gui.md§2.4.

guicontrol.repaint() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Asks for a repaint; the toolkit repaints every frame, so this does nothing.

Control.repaint();

Specification: gui.md§3.

guicontrol.resize(x: number, y: number, width: number, height: number) -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Sets position and size at once; the children follow their sizing modes and the control raises onResize.

MainWindow.resize(10, 10, 300, 200);

Specification: gui.md§2.4.

guicontrol.resizeheight: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).

new GuiBitmapBorderCtrl("MyControl") { resizeheight = 1; }

Specification: gui.md§3.

guicontrol.resizewidth: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).

new GuiBitmapBorderCtrl("MyControl") { resizewidth = 1; }

Specification: gui.md§3.

guicontrol.rotation: number

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Rotation of the control in radians; kept for scripts and for transitions.

Ctrl.rotation = 0.5;

Specification: gui.md§2.6.

guicontrol.rotationcenter: array

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

The point the rotation turns around, as x and y; defaults to 0, 0.

Ctrl.rotationcenter = {10, 10};

Specification: gui.md§2.6.

guicontrol.scrolllinex: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).

new GuiBitmapBorderCtrl("MyControl") { scrolllinex = 1; }

Specification: gui.md§3.

guicontrol.scrollliney: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Property of GuiBitmapBorderCtrl in the legacy GUI toolkit (gui.md§2, §3).

new GuiBitmapBorderCtrl("MyControl") { scrollliney = 1; }

Specification: gui.md§3.

guicontrol.scrolltobottom() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Scrolls the scroll control around this control to the bottom.

Content.scrollToBottom();

Specification: gui.md§3.

guicontrol.scrolltotop() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Scrolls the scroll control around this control to the top.

Content.scrollToTop();

Specification: gui.md§3.

guicontrol.show() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Makes the control visible and raises onShow when it was hidden.

MainWindow.show();

Specification: gui.md§2.4.

guicontrol.showhint: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Whether the hint is shown.

new GuiControl("MyControl") { showhint = true; }

Specification: gui.md§2.2.

guicontrol.showtop() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Shows the control and brings it in front of its siblings.

MainWindow.showTop();

Specification: gui.md§2.4.

guicontrol.sortcontrols() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Orders the child controls by their y position.

Control.sortcontrols();

Specification: gui.md§3.

guicontrol.startdrag() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Moves the control with the mouse until the button goes up.

Control.startdrag();

Specification: gui.md§3.

guicontrol.stopanimations() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Stops control animations; there are none, so this does nothing.

Control.stopanimations();

Specification: gui.md§3.

guicontrol.stopinoutanimations() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Stops animations that move a control in or out; there are none, so this does nothing.

Control.stopinoutanimations();

Specification: gui.md§3.

guicontrol.style: string

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Name of the GUI style the control follows; setting a different one raises onStyleChanges.

Ctrl.style = "dark";

Specification: gui.md§2.6.

guicontrol.tabfirst() -> boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Focuses the first descendant that can take key focus.

Form.tabFirst();

Specification: gui.md§2.4.

guicontrol.useownprofile: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Whether the control keeps a private copy of its profile.

new GuiControl("MyControl") { useownprofile = true; }

Specification: gui.md§2.3.

guicontrol.vertsizing: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

How the control follows a parent that changes height: bottom, top, center, height or relative.

new GuiControl("MyControl") { vertsizing = "height"; }

Specification: gui.md§2.1.

guicontrol.visible: boolean

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Whether the control and its children are drawn.

new GuiControl("MyControl") { visible = true; }

Specification: gui.md§2.2.

guicontrol.width: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Width in pixels.

new GuiControl("MyControl") { width = 10; }

Specification: gui.md§2.1.

guicontrol.x: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Left edge in pixels, relative to the parent.

new GuiControl("MyControl") { x = 10; }

Specification: gui.md§2.1.

guicontrol.y: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Top edge in pixels, relative to the parent.

new GuiControl("MyControl") { y = 10; }

Specification: gui.md§2.1.

Engine version 0.1.0. Built 2026-11-18.