Control:CaptureFocus
Focuses a textbox.
Syntax
Signature
Control:CaptureFocus() -> ()Aliases
This function has no aliases.
Parameters
This function takes no parameters.
Returns
| Type | Description |
|---|---|
() | None. |
Notes
Releases the previously focused textbox first. Places the cursor at the end, or clears the text when ClearTextOnFocus is true, then fires Focused.
Example
Luau
local Box = Drawing.create("TextBox", {Text = "Hello"})
Box:CaptureFocus()