WoW:XML/EditBox: Difference between revisions

From AddOn Studio
< XML
Jump to navigation Jump to search
Line 1: Line 1:
__NOTOC__
{{uixmlelem}}
==Inheritance==
Derived from: <[[XML/Frame|Frame]]>


Runtime object: [[UIOBJECT_EditBox|EditBox]]
== Inheritance ==
: Inherited by: none, Inherits: <[[XML/Frame|Frame]]>, Runtime object: [[UIOBJECT_EditBox|EditBox]]
: Defined in: [[XML/Frames|Frames]], [[XML/Ui|Ui]]


==Elements==
== Elements ==
* <[[XML/FontString|FontString]]> - the font to be used for the textbox text, use this or the font attribute
* <[[XML/FontString|FontString]]> - the font to be used for the textbox text, use this or the font attribute
* <HighlightColor> ([[XML/Color|Color]]) - the highlight color for the textbox text
* <nowiki><HighlightColor></nowiki> ([[XML/Color|Color]]) - the highlight color for the textbox text
* <TextInsets> ([[XML/Inset|Inset]])
* <nowiki><TextInsets></nowiki> ([[XML/Inset|Inset]])


==Attributes==
== Attributes ==
;font
* font {{attrtype|string}} - name of one of the predefined fonts to use in your EditBox. For example, "GameFontNormal".
:{{attrtype|string}} - name of one of the predefined fonts to use in your EditBox. For example, "GameFontNormal".
* letters {{attrtype|int|0}} - maximum number of letters which can be entered in this EditBox. Zero means no character limit.
;letters
* blinkSpeed {{attrtype|float|0.5}} - speed of cursor blinking, interval in seconds between "blinks".
:{{attrtype|int|0}} - maximum number of letters which can be entered in this EditBox. Zero means no character limit.
* numeric {{attrtype|boolean|false}} - if true, then only digits 0-9 can be entered in this EditBox
;blinkSpeed
* password {{attrtype|boolean|false}} - if true, then asterisks will be displayed instead of whatever text you enter.
:{{attrtype|float|0.5}} - speed of cursor blinking, interval in seconds between "blinks".
* multiLine {{attrtype|boolean|false}} - multi-line EditBox
;numeric
* historyLines {{attrtype|int|0}} - Number of lines to keep as a "history" for this editbox. You can cycle through editbox' history with arrows Up and Down (or Alt+Up, Alt+Down if attribute 'ignoreArrows' set to true)
:{{attrtype|boolean|false}} - if true, then only digits 0-9 can be entered in this EditBox
* autoFocus {{attrtype|boolean|true}} - if true, then this EditBox will automatically receive keyboard focus when it is displayed.
;password
* ignoreArrows {{attrtype|boolean|false}} - if false, then pressing arrows on keyboard will move cursor around the EditBox. If set to true, then EditBox will ignore arrows and they will instead turn around your character in game world. In this case you can still move text cursor around your editbox with Alt-arrows.
:{{attrtype|boolean|false}} - if true, then asterisks will be displayed instead of whatever text you enter.
;multiLine
:{{attrtype|boolean|false}} - multi-line EditBox
;historyLines
:{{attrtype|int|0}} - Number of lines to keep as a "history" for this editbox. You can cycle through editbox' history with arrows Up and Down (or Alt+Up, Alt+Down if attribute '''ignoreArrows''' set to true)
;autoFocus
:{{attrtype|boolean|true}} - if true, then this EditBox will automatically receive keyboard focus when it is displayed.
;ignoreArrows
:{{attrtype|boolean|false}} - if false, then pressing arrows on keyboard will move cursor around the EditBox. If set to true, then EditBox will ignore arrows and they will instead turn around your character in game world. In this case you can still move text cursor around your editbox with Alt-arrows.


==Description==
== Description ==
====Example====
=== Example ===
Included in [[XML/Frame/Backdrop|Backdrop]]
Included in [[XML/Backdrop|Backdrop]]


  <EditBox name="$parentEditBox" letters="80">
  <EditBox name="$parentEditBox" letters="80">
Line 70: Line 61:
  </EditBox>
  </EditBox>


[[Image:Editbox.jpg]]
[[Image:wow_editbox.jpg]]
[[Category:XML elements]]
[[Category:XML elements]]

Revision as of 01:56, 17 December 2020

XML UI ← XML elements < EditBox

Inheritance

Inherited by: none, Inherits: <Frame>, Runtime object: EditBox
Defined in: Frames, Ui

Elements

  • <FontString> - the font to be used for the textbox text, use this or the font attribute
  • <HighlightColor> (Color) - the highlight color for the textbox text
  • <TextInsets> (Inset)

Attributes

  • font (string) - name of one of the predefined fonts to use in your EditBox. For example, "GameFontNormal".
  • letters (int) Default is 0. - maximum number of letters which can be entered in this EditBox. Zero means no character limit.
  • blinkSpeed (float) Default is 0.5. - speed of cursor blinking, interval in seconds between "blinks".
  • numeric (boolean) Default is false. - if true, then only digits 0-9 can be entered in this EditBox
  • password (boolean) Default is false. - if true, then asterisks will be displayed instead of whatever text you enter.
  • multiLine (boolean) Default is false. - multi-line EditBox
  • historyLines (int) Default is 0. - Number of lines to keep as a "history" for this editbox. You can cycle through editbox' history with arrows Up and Down (or Alt+Up, Alt+Down if attribute 'ignoreArrows' set to true)
  • autoFocus (boolean) Default is true. - if true, then this EditBox will automatically receive keyboard focus when it is displayed.
  • ignoreArrows (boolean) Default is false. - if false, then pressing arrows on keyboard will move cursor around the EditBox. If set to true, then EditBox will ignore arrows and they will instead turn around your character in game world. In this case you can still move text cursor around your editbox with Alt-arrows.

Description

Example

Included in Backdrop

<EditBox name="$parentEditBox" letters="80">
    <Size x="100" y="32" />
    <Anchors>
        <Anchor point="LEFT">
            <Offset x="50" y="0" />
        </Anchor>
    </Anchors>
    <Layers>
        <Layer level="BACKGROUND">
            <Texture file="Interface\ChatFrame\UI-ChatInputBorder-Left">
                <Size x="75" y="32" />
                <Anchors>
                    <Anchor point="LEFT">
                        <Offset x="-10" y="0" />
                    </Anchor>
                </Anchors>
                <TexCoords left="0" right="0.2" top="0" bottom="1.0"/>
            </Texture>
            <Texture file="Interface\ChatFrame\UI-ChatInputBorder-Right">
                <Size x="75" y="32" />
                <Anchors>
                    <Anchor point="RIGHT">
                        <Offset x="10" y="0" />
                    </Anchor>
                </Anchors>
                <TexCoords left="0.7" right="1.0" top="0" bottom="1.0"/>
            </Texture>
        </Layer>
    </Layers>
    <Scripts>
        <OnLoad>
        </OnLoad>
    </Scripts>
    <FontString inherits="ChatFontNormal" />
</EditBox>

Wow editbox.jpg