TextBox
Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.
Up and coming
An editable text field with everything a desktop field needs: caret, selection, clipboard, undo, Japanese input and a submit key.
Caret and word moves with Shift and Ctrl, Ctrl+A, C, X and V, Ctrl+Z and Y, a right-click Cut, Copy and Paste, and the Windows input method for Japanese are built in. SubmitKey picks Enter, Ctrl+Enter or none. Markup is off while the box has focus, the focus look fades in, and a box that replaces a label starts out looking just like it.
Made with Instance.new("TextBox") or Clone().
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| PlaceholderText | string | ||
| MultiLine | boolean | ||
| SubmitKey | "Enter" | "CtrlEnter" | "None" | With "Enter", Enter submits and Shift+Enter adds a line. | |
| Editable | boolean | False leaves select and copy only. | |
| MaxLength | number? | ||
| Focused | boolean | read-only | |
| CursorPosition | number | The caret, in characters counted from 1; -1 without focus. | |
| SelectionStart | number | Where the selection starts; -1 without a selection. |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| CaptureFocus | () | () | |
| ReleaseFocus | () | () | |
| InsertText | (text: string) | () | Inserts at the caret, over any selection, as one undo step. |
| SelectAll | () | () |
Events
| Name | Passes | Description |
|---|---|---|
| TextChanged | (string) | |
| Submitted | (string) | |
| FocusGained | () | |
| FocusLost | (boolean) | Passes true when focus was lost by submitting. |
From TextLabel 17
From UIObject 19
From ScreenItem 2
From ShotInstance 33
ClassNameNameParentAncestryChangedAttributeChangedChangedChildAddedChildRemovedDestroyingAddTagClearAllChildrenCloneDestroyFindFirstAncestorFindFirstAncestorOfClassFindFirstAncestorWhichIsAFindFirstChildFindFirstChildOfClassFindFirstChildWhichIsAGetAttributeGetAttributeChangedSignalGetAttributesGetChildrenGetDescendantsGetFullNameGetPropertyChangedSignalGetTagsHasTagIsAIsAncestorOfIsDescendantOfRemoveTagSetAttribute
