Skip to content

guimltexteditctrl: members

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

guimltexteditctrl.addtext(text: string, replace: boolean) -> number

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

Appends markup to a markup text control, or replaces its content when the second argument is true.

Log.addText("<b>hi</b><br>", false);

Specification: gui.md§3.

guimltexteditctrl.allowcolorchars: boolean

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

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

new GuiMLTextEditCtrl("MyControl") { allowcolorchars = 1; }

Specification: gui.md§3.

guimltexteditctrl.allowedtags: string

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

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

new GuiMLTextEditCtrl("MyControl") { allowedtags = 1; }

Specification: gui.md§3.

guimltexteditctrl.autoindenting: boolean

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

Enter starts the new line with the indent of the current one (one step more after {); a } typed on a blank line goes back one step.

new GuiMLTextEditCtrl("MyControl") { autoindenting = 1; }

Specification: gui.md§3.

guimltexteditctrl.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.

guimltexteditctrl.cleartext() -> number

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

Empties a markup text control.

Log.clearText();

Specification: gui.md§3.

guimltexteditctrl.cursorposition: number

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

The caret as a byte offset into the text; writing moves it.

Text.cursorposition = 0;

Specification: gui.md§3.12.

guimltexteditctrl.deniedsound: string

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

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

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

Specification: gui.md§3.

guimltexteditctrl.deselecttext() -> number

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

Removes the text selection.

Control.deselecttext();

Specification: gui.md§3.

guimltexteditctrl.disallowedtags: string

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

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

new GuiMLTextEditCtrl("MyControl") { disallowedtags = 1; }

Specification: gui.md§3.

guimltexteditctrl.findtext(arg1: string) -> number

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

Returns the index of the first row with this text, or the position of the first match in multi-line text.

Control.findtext("");

Specification: gui.md§3.

guimltexteditctrl.findtextat(arg1: string, arg2: number, arg3: number) -> number

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

Returns the position of the first match of a text at or after a position, or -1.

Control.findtextat("", 0, 0);

Specification: gui.md§3.

guimltexteditctrl.getcolumnandlineofposition(arg1: number) -> string

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

Returns the column and the line of a character position as an array.

Control.getcolumnandlineofposition(0);

Specification: gui.md§3.

guimltexteditctrl.getcursorline() -> number

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

Returns the line the text cursor is on.

Control.getcursorline();

Specification: gui.md§3.

guimltexteditctrl.getline(arg1: number) -> string

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

Returns one line of multi-line text.

Control.getline(0);

Specification: gui.md§3.

guimltexteditctrl.getlinecount() -> number

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

Returns the number of lines of multi-line text.

Control.getlinecount();

Specification: gui.md§3.

guimltexteditctrl.getlines() -> array

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

Returns the lines of multi-line text as an array.

Control.getlines();

Specification: gui.md§3.

guimltexteditctrl.getselectedlength() -> number

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

Returns the length of the text selection, or -1 without one.

Control.getselectedlength();

Specification: gui.md§3.

guimltexteditctrl.getselectedposition() -> number

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

Returns where the text selection starts, or -1 without one.

Control.getselectedposition();

Specification: gui.md§3.

guimltexteditctrl.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.

guimltexteditctrl.htmlcompatibility: boolean

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

Kept for scripts: asks for the markup rules of a web page.

new GuiMLTextEditCtrl("MyControl") { htmlcompatibility = true; }

Specification: gui.md§3.12.

guimltexteditctrl.htmllinks: boolean

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

When true a link to a name inside the text scrolls there on its own; other links only raise onURL.

new GuiMLTextEditCtrl("MyControl") { htmllinks = true; }

Specification: gui.md§3.12.

guimltexteditctrl.maxchars: number

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

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

new GuiMLTextEditCtrl("MyControl") { maxchars = 1; }

Specification: gui.md§3.

guimltexteditctrl.maxlength: number

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

Most characters the player can type.

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

Specification: gui.md§3.

guimltexteditctrl.onCursorLineChanged(line: number)

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

Raised when the caret moves to another line, with the line number counted from 0.

function MyControl.onCursorLineChanged(line) {
echo(line);
}

Specification: gui.md§3.13.

guimltexteditctrl.onReflow(width: number, height: number)

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

Raised after the text was laid out again, with the width and height of the content.

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

Specification: gui.md§3.13.

guimltexteditctrl.onRightSelectTag(tag: string)

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

Raised when the right button is pressed on a block marked with a tag, with the tag value.

function MyControl.onRightSelectTag(tag) {
echo(tag);
}

Specification: gui.md§3.12.

guimltexteditctrl.onSelectTag(tag: string)

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

Raised when the left button is pressed on a block marked with a tag, with the tag value.

function MyControl.onSelectTag(tag) {
echo(tag);
}

Specification: gui.md§3.12.

guimltexteditctrl.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.

guimltexteditctrl.parsetags: boolean

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

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

new GuiMLTextEditCtrl("MyControl") { parsetags = 1; }

Specification: gui.md§3.

guimltexteditctrl.plaintext: string

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

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

new GuiMLTextEditCtrl("MyControl") { plaintext = 1; }

Specification: gui.md§3.

guimltexteditctrl.replacetext(arg1: string, arg2: string, arg3: number) -> number

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

Replaces every match of a text and returns how many were replaced.

Control.replacetext("", "", 0);

Specification: gui.md§3.

guimltexteditctrl.scrolltoline(arg1: number) -> number

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

Scrolls multi-line text to a line.

Control.scrolltoline(0);

Specification: gui.md§3.

guimltexteditctrl.scrolltoposition(arg1: number) -> number

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

Scrolls multi-line text to a character position.

Control.scrolltoposition(0);

Specification: gui.md§3.

guimltexteditctrl.scrolltotag(tag: string) -> boolean

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

Scrolls to the place an anchor with that name marks. False when the text has none.

Text.scrollToTag("chapter2");

Specification: gui.md§3.12.

guimltexteditctrl.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.

guimltexteditctrl.selecttext(arg1: number, arg2: number) -> boolean

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

Selects a part of the text and returns whether it worked.

Control.selecttext(0, 0);

Specification: gui.md§3.

guimltexteditctrl.setcursorcolumnandline(arg1: number, arg2: number) -> number

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

Puts the text cursor at a column of a line.

Control.setcursorcolumnandline(0, 0);

Specification: gui.md§3.

guimltexteditctrl.setlines(arg1: object) -> number

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

Replaces the text with the lines of an array.

Control.setlines("");

Specification: gui.md§3.

guimltexteditctrl.setscrolltop(position: number) -> number

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

Scrolls a markup text control to a vertical position in pixels; inside a scroll control the scroll control moves.

Log.setScrollTop(0);

Specification: gui.md§3.

guimltexteditctrl.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.

guimltexteditctrl.showcursor: boolean

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

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

Edit.showcursor = false;

Specification: gui.md§3.12.

guimltexteditctrl.syntaxhighlighting: boolean

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

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

new GuiMLTextEditCtrl("MyControl") { syntaxhighlighting = 1; }

Specification: gui.md§3.

guimltexteditctrl.tabspaces: number

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

Spaces Tab inserts and the indent step of autoindenting; 0 inserts a tab character.

new GuiMLTextEditCtrl("MyControl") { tabspaces = 10; }

Specification: gui.md§3.

guimltexteditctrl.text: string

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

The text the control shows.

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

Specification: gui.md§3.

guimltexteditctrl.trimhorizontally() -> number

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

Removes empty space at the sides of centered text; accepted and ignored.

Control.trimhorizontally();

Specification: gui.md§3.

guimltexteditctrl.undostacksize: number

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

How many earlier texts undo can go back through; 16 by default.

Edit.undostacksize = 50;

Specification: gui.md§3.12.

guimltexteditctrl.urlbase: string

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

Kept for scripts: the address relative links are based on.

new GuiMLTextEditCtrl("MyControl") { urlbase = "http://example.org/"; }

Specification: gui.md§3.12.

guimltexteditctrl.wordwrap: boolean

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

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

new GuiMLTextEditCtrl("MyControl") { wordwrap = 1; }

Specification: gui.md§3.

Engine version 0.1.0. Built 2026-11-18.