Skip to content

guitexteditctrl: members

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

guitexteditctrl.clear() -> number

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

Empties a text edit, drop-down, tab bar, context menu, or text list.

List.clear();

Specification: gui.md§3.

guitexteditctrl.deniedsound: string

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

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

new GuiTextEditCtrl("MyControl") { deniedsound = 1; }

Specification: gui.md§3.

guitexteditctrl.gettext() -> string

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

The text of a text edit or markup text control, as stored.

echo(Edit.getText());

Specification: gui.md§3.

guitexteditctrl.getvalue() -> any

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

The value of a check box, radio button, slider, progress bar, number input, or the text of a text edit.

echo(Box.getValue());

Specification: gui.md§3.

guitexteditctrl.historysize: number

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

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

new GuiTextEditCtrl("MyControl") { historysize = 1; }

Specification: gui.md§3.

guitexteditctrl.inputtype: string

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

What the field is for: default, password (shows stars), email, url or numbers.

new GuiTextEditCtrl("MyControl") { inputtype = "password"; }

Specification: gui.md§3.11.

guitexteditctrl.maxchars: number

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

Longest text the player can type; 255 by default and 0 for no limit.

new GuiTextEditCtrl("MyControl") { maxchars = 20; }

Specification: gui.md§3.11.

guitexteditctrl.maxlength: number

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

Most characters the player can type.

new GuiTextEditCtrl("MyControl") { maxlength = 10; }

Specification: gui.md§3.

guitexteditctrl.numbersonly: boolean

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

Whether only digits can be typed.

new GuiTextEditCtrl("MyControl") { numbersonly = true; }

Specification: gui.md§3.

guitexteditctrl.onAction(text: string)

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.

guitexteditctrl.onTabComplete(shift: boolean)

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

Raised when Tab is pressed in a field with tabcomplete set, with its text; the focus stays.

function MyControl.onTabComplete(text) {
echo(text);
}

Specification: gui.md§3.13.

guitexteditctrl.onTextEditStart()

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

Raised when the field gets the focus and the player can start typing.

function MyControl.onTextEditStart() {
echo("typing");
}

Specification: gui.md§3.13.

guitexteditctrl.password: boolean

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

Whether typed characters are hidden.

new GuiTextEditCtrl("MyControl") { password = true; }

Specification: gui.md§3.

guitexteditctrl.selectall() -> number

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

Selects all the text of a text edit.

Edit.selectAll();

Specification: gui.md§3.

guitexteditctrl.setselection(arg1: number, arg2: number) -> number

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

Selects a range of the text of an edit.

Control.setselection(0, 0);

Specification: gui.md§3.

guitexteditctrl.settext(text: string) -> number

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

Replaces the text of a text edit; the caret goes to the end.

Edit.setText("hello");

Specification: gui.md§3.

guitexteditctrl.showcursor: boolean

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

Whether the caret is drawn while the field has the focus; true by default.

new GuiTextEditCtrl("MyControl") { showcursor = false; }

Specification: gui.md§3.11.

guitexteditctrl.stylesection: string

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

Name of the part of the GUI style the text color comes from; kept without GUI styles.

new GuiTextEditCtrl("MyControl") { stylesection = "Clock"; }

Specification: gui.md§3.11.

guitexteditctrl.tabcomplete: boolean

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

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

new GuiTextEditCtrl("MyControl") { tabcomplete = 1; }

Specification: gui.md§3.

guitexteditctrl.text: string

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

The text the control shows.

new GuiTextEditCtrl("MyControl") { text = "Hello"; }

Specification: gui.md§3.

guitexteditctrl.undo() -> number

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

Brings back the text an edit had before its last change.

Control.undo();

Specification: gui.md§3.

Engine version 0.1.0. Built 2026-11-18.