WoW:API EditBox SetText: Difference between revisions

m
Move page script moved page API EditBox SetText to WoW:API EditBox SetText without leaving a redirect
No edit summary
 
m (Move page script moved page API EditBox SetText to WoW:API EditBox SetText without leaving a redirect)
 
(7 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<center>'''SetText''' ''-Documentation by DerGhulbus-''</center>
{{widgetmethod}}
__NOTOC__


editBox:SetText(String)
Sets editBox's text to the specified string.


Sets the editBox's text to the specified string.
editBox:SetText(str)


----
;''Arguments''


:String
== Arguments ==
:;String: the string you want to appear in the EditBox
:'''str''' (string) -- the string you want to appear in the EditBox
----
;''Returns''


???
== Returns ==
:''nil''


----
== Details ==
;''Details''
You should call a SetText("") every time you read from an EditBox, so the command line is free for the next input.


You should call a SetText("") every time you read from an EditBox, so the command line is free for the next input.
SetText fails when the text contains characters that aren't renderable (e.g. control chars, invalid UTF8). In that case the EditBox is cleared and [[API EditBox GetText|EditBox:GetText()]] returns the empty string.
 
Before {{battle-inline}} ''Battle for Azeroth'', unrenderable chars were displayed as '?'.{{fact|What does it do now?}}


----
== See Also ==
{{Template:WoW API}}
* [[UIOBJECT EditBox|EditBox object]]
[[Category:API Functions|EditBox]]
* [[API EditBox GetText|EditBox:GetText()]]
* [[API EditBox GetNumber|EditBox:GetNumber()]]
* [[UI Escape Sequences]]
Anonymous user