Widget API: EditBox:GetText

From AddOn Studio
Revision as of 04:45, 15 August 2023 by Move page script (talk) (Move page script moved page API EditBox GetText to API EditBox GetText without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Widget API ← EditBox < GetText

Returns the text that is currently entered in the EditBox.

local text = editBox:GetText()

Parameters

Arguments

None

Returns

  • text (string) - the current text in the EditBox as a string

Details

Note that the special characters "|" and "\" are escaped in the returned string. That way GetText() returns "||" instead of "|" and "\\" instead of "\".

Comments

If you want to read in numbers you should use the GetNumber() function instead.