Jump to content
Toggle menu
  • 17.3K articles
  • 8.2K files
  • 5 users
  • 280.7K edits
WoW Classic Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Edit Box

A user can input text into the edit box which can then be retrieved using the EditBox:GetText() function.

When you declare an edit box object make sure that you include a FontString element which defines the Font which is used to display the text inputted into the EditBox:

<EditBox name="TestEditBox">
      .. Size
      .. Anchors
      .. Layers
      .. etc.
      
      <FontString inherits="GameFontNormal"/>
</EditBox>


EditBox will not display any text without the FontString object, just the blinking cursor --watchout (7 June 2006, WoW 1.10)

On multi-line and EditBox:SetHeight()

Note that multi-line EditBoxes will ignore any attempts to set its height via :SetHeight() or via Dimension attributes in XML. They will start out the height of a single line of text, and keep expanding their area as needed. This effect becomes visible if the editbox has a backdrop set, or a texture anchored to its corners.

Explicitly setting the top and bottom anchors with :SetPoint() will however size it like expected.

An EditBox has the following scripts available (not sure if thats all but it's a bunch of em) :

<OnEnterPressed> <OnEscapePressed> <OnSpacePressed> <OnTabPressed> <OnTextChanged> <OnTextSet> <OnInputLanguageChanged>

I think those are self explanatory.