Skip to content

guimltextctrl: members

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

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

guimltextctrl.allowcolorchars: boolean

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

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

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

Specification: gui.md§3.

guimltextctrl.allowedtags: string

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

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

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

Specification: gui.md§3.

guimltextctrl.cleartext() -> number

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

Empties a markup text control.

Log.clearText();

Specification: gui.md§3.

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

guimltextctrl.deniedsound: string

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

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

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

Specification: gui.md§3.

guimltextctrl.deselecttext() -> number

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

Removes the text selection.

Control.deselecttext();

Specification: gui.md§3.

guimltextctrl.disallowedtags: string

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

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

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

Specification: gui.md§3.

guimltextctrl.findtext(text: string, flags?: number) -> 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. The flags are 1 (wrap at the end of the text) plus 2 (case sensitive).

Control.findtext("");

Specification: gui.md§3.

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

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

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

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

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

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

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

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

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

guimltextctrl.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 GuiMLTextCtrl("MyControl") { htmlcompatibility = true; }

Specification: gui.md§3.12.

guimltextctrl.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 GuiMLTextCtrl("MyControl") { htmllinks = true; }

Specification: gui.md§3.12.

guimltextctrl.maxchars: number

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

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

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

Specification: gui.md§3.

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

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

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

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

guimltextctrl.onURL(href: string)

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

Raised when a link of the markup text is clicked, with its address.

function MyControl.onURL(href) {
echo("onURL");
}

Specification: gui.md§3.2.

guimltextctrl.parsetags: boolean

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

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

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

Specification: gui.md§3.

guimltextctrl.plaintext: string

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

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

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

Specification: gui.md§3.

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

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

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

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

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

guimltextctrl.setcursorcolumnandline(column: number, line: number) -> number

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

Moves the caret to the column of the line, both counted from 0.

Text.setCursorColumnAndLine(0, 3);

Specification: gui.md§3.12.

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

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

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

guimltextctrl.syntaxhighlighting: boolean

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

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

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

Specification: gui.md§3.

guimltextctrl.text: string

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

The text the control shows.

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

Specification: gui.md§3.

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

guimltextctrl.urlbase: string

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

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

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

Specification: gui.md§3.12.

guimltextctrl.wordwrap: boolean

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

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

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

Specification: gui.md§3.

Engine version 0.1.0. Built 2026-11-18.