WoW:API EditBox GetText: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(added information about special characters, being escaped)
m (Move page script moved page API EditBox GetText to WoW:API EditBox GetText without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{widgetmethod}}
{{widgetmethod|toc=0}}
Returns the text that is currently entered in the EditBox.
local text = editBox:GetText()


<center>'''GetText''' ''-Documentation by DerGhulbus-''</center>
== Parameters ==
=== Arguments ===
: None


str = editBox:GetText()
=== Returns ===
* text (string) - the current text in the EditBox as a string


Returns the String that is currently entered in the EditBox.
== Details ==
 
----
;''Arguments''
 
''???''
----
;''Returns''
 
:str
:;str: String - the current String in the EditBox
----
;''Details''
Note that the special characters "|" and "\" are escaped in the returned string. That way GetText() returns "||" instead of "|" and "\\" instead of "\".
Note that the special characters "|" and "\" are escaped in the returned string. That way GetText() returns "||" instead of "|" and "\\" instead of "\".


----
== Comments ==
;''Comments''
 
If you want to read in numbers you should use the [[API EditBox GetNumber|GetNumber()]] function instead.
If you want to read in numbers you should use the [[API EditBox GetNumber|GetNumber()]] function instead.

Latest revision as of 04:45, 15 August 2023

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.