104,541pages on
this wiki
Add New Page
Add New Page Talk0
Widget API < EditBox

For summary of all EditBox properties / methods see UISUMMARY EditBox

Edit Box Edit

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"/>

XML Edit

See XML/EditBox.


Methods Edit

Event Handlers Edit

On multi-line and EditBox:SetHeight() Edit

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.

Also on Fandom

Random Wiki