guimltexteditctrl: members
49 implemented, 0 reserved. Entries are sorted by name.
Implemented
Section titled “Implemented”addtext
Section titled “addtext”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.
allowcolorchars
Section titled “allowcolorchars”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.
allowedtags
Section titled “allowedtags”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.
autoindenting
Section titled “autoindenting”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.
cleartext
Section titled “cleartext”guimltexteditctrl.cleartext() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Empties a markup text control.
Log.clearText();Specification: gui.md§3.
cursorposition
Section titled “cursorposition”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.
deniedsound
Section titled “deniedsound”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.
deselecttext
Section titled “deselecttext”guimltexteditctrl.deselecttext() -> number
Runs on: client only. Origin: compatibility. Since: M8. Playground: no.
Removes the text selection.
Control.deselecttext();Specification: gui.md§3.
disallowedtags
Section titled “disallowedtags”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.
findtext
Section titled “findtext”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.
findtextat
Section titled “findtextat”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.
getcolumnandlineofposition
Section titled “getcolumnandlineofposition”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.
getcursorline
Section titled “getcursorline”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.
getline
Section titled “getline”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.
getlinecount
Section titled “getlinecount”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.
getlines
Section titled “getlines”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.
getselectedlength
Section titled “getselectedlength”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.
getselectedposition
Section titled “getselectedposition”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.
gettext
Section titled “gettext”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.
htmlcompatibility
Section titled “htmlcompatibility”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.
htmllinks
Section titled “htmllinks”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.
maxchars
Section titled “maxchars”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.
maxlength
Section titled “maxlength”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.
onCursorLineChanged
Section titled “onCursorLineChanged”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.
onReflow
Section titled “onReflow”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.
onRightSelectTag
Section titled “onRightSelectTag”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.
onSelectTag
Section titled “onSelectTag”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.
onTextEditStart
Section titled “onTextEditStart”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.
parsetags
Section titled “parsetags”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.
plaintext
Section titled “plaintext”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.
replacetext
Section titled “replacetext”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.
scrolltoline
Section titled “scrolltoline”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.
scrolltoposition
Section titled “scrolltoposition”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.
scrolltotag
Section titled “scrolltotag”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.
selectall
Section titled “selectall”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.
selecttext
Section titled “selecttext”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.
setcursorcolumnandline
Section titled “setcursorcolumnandline”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.
setlines
Section titled “setlines”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.
setscrolltop
Section titled “setscrolltop”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.
settext
Section titled “settext”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.
showcursor
Section titled “showcursor”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.
syntaxhighlighting
Section titled “syntaxhighlighting”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.
tabspaces
Section titled “tabspaces”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.
trimhorizontally
Section titled “trimhorizontally”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.
undostacksize
Section titled “undostacksize”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.
urlbase
Section titled “urlbase”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.
wordwrap
Section titled “wordwrap”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.