Wikia

WoWWiki

UIOBJECT EditBox

Talk0
101,736pages on
this wiki
Revision as of 17:10, September 17, 2009 by SinusPi (Talk | contribs)

Widget API

For summary of EditBox properties/methods see UISUMMARY EditBox

Edit Box

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

When declaring an edit box object make sure that you either set "font" attribute for <EditBox> element, or include a <FontString> element, thus declaring which font is to be used to display text input into your edit box. If you do not do so EditBox will not display any text, just a blinking cursor.

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

XML

See XML/EditBox.

LUA API

Methods


Event Handlers


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.

Around Wikia's network

Random Wiki