XML attributes

Revision as of 19:52, September 28, 2012 by Celess22 (Talk | contribs)

103,443pages on
this wiki

WoW XML attributes and other elements that can be applied to XML elements. These describe the actual XML attributes for WoW XML elements and should not be confused with the actual WoW XML type of Attribute or Attributes .

Strictly speaking as far as XML goes, attributes are inline properties of an element, like so: <element attribute="value"/>. Elements are however properties that are grouped inside the element tag as children, like so: <element><element attribute="value"/></element>. An element's properties are either the attributes, or 'child elements' of that element. The title of this page is 'XML attributes', but it should have been called 'XML properties', as its intent is to document in one place some of the properties, especially the common ones, like <Size> or 'name'. There are also Types, which are the kind of thing a property is. Keep this in mind, and towards this, this page is broken down into two major sections.

Types for properties

  • string - String, just some text
  • int - Integer, number (0,1,2,3,4,5...)
  • float - Single, number with point (0.3 or 1.65 etc)
  • bool - Boolean, one of '0', '1', 'true', 'false' to indicate enable or disable, or on or off, etc...
  • enum - List, an enumeration, or one of a set of predefined values
  • Element - Element Type, name of element


alpha (float)

Elements can be transparent and this property used to define it.

  • 0 - full transparent
  • 1 - solid (default)

alphaMode (ALPHAMODE)

Defines a way transparency applied:

  • DISABLE - no transparency.
  • BLEND - while background fades element gets stronger (default)
  • ADD - background and element colors added resulting in too bright colors
  • APLHAKEY - transparency depends on alpha channel of textures
  • MOD - Not tested

autoFocus (bool)

Automatically place the cursor bar inside a text box and receive all of the keyboard's attention. Default is 'true'.

blinkSpeed (float)

. Default is '0.5'.

bytes (int)

checked (bool)

If set to true - CheckButton is checked when loaded. Default is false

clampedToScreen (bool)

Prohibits element to go out of screen. Way applied unknown, probably just moved.




enableKeyboard (bool)

Tell the frame to receive keyboard input.

enableMouse (bool)

Tell the frame to receive mouse input.

file (string)

This refers to a file used by element, path is relative to scheme path: if addon is in "MyAddon" folder file specified "myfile.lua" will be searched in this folder (i guess only, needs testing). "\\Interface\\Wherever" seems to be the same as "Interface\\Wherever" ("C:\\{{WoW}}\\Interface\\Wherever").

font (string)


hidden (bool)

If true element is skipped in drawing resulting it not appearing on screen (interactions also skipped). Default false.

historyLines (int)

password (bool)

Determines if text should be viewed using hidden 'password' format.

id (int)

Number of element. Used for same looking element to make difference between them (much easier than by names)

ignoreArrows (bool)

Text fields will ignore directional arrows and move the character instead. (Holding <Alt> temporarily sets this to true). Default false.

countInvisibleLetters (bool)

inherits (Element)

Name of element to take properties from. Element must be marked with "virtual=true" attribute (not tested otherwise). For some reason it's allowed to inherit elements of different types. In that case properties are copied, and unused ones are ignored(need to be tested too). You can define more that one template to use:

<Button inherits="OneTemplate, TwoTemplate">
Properties will be taken first from "OneTemplate" and then "TwoTemplate" so if they have the same properties from second will be taken.


Tells a MessageFrame where to put new content. Accepts "TOP" or "BOTTOM". Default "TOP"


Align text "LEFT", "RIGHT", or "CENTER".


Align text "TOP", "BOTTOM", or "MIDDLE".


Defines the maximum characters to allow in a text box.

multiLine (bool)

Tells a text box to span multiple lines (<Enter> inserts a line break).


Defines the maximum number of lines to allow in a text box.

maxvalue (float)

Defines the highest numeric value a widget will accept.



minvalue (float)

Defines the lowest numeric value a widget will accept.


movable (bool)

(De)Activates the methods, :StartMoving() and :StopMovingOrSizing(). Default false.

name (string)

This string represents name of an element for scripting. Frames defined via XML must be named if they are to be accessed by scripts, but for showing up in interface unnamed are ok. Names are case sensitive - means "MyElement" not same as "myelement". See: LayoutFrame


Name of Lua object reference to set in the parent, to this elements Lua object at runtime. in LayoutFrame, AnimationGroup, Animation.


Name of to add this LayoutFrame to a Lua list in its parent. in LayoutFrame.


Don't wrap text when it gets to the end of the parent frame.


Tells the text box to accept only numeric values.



Name of an element to make this element relative to. in Anchor


Name of an 'parentKey' or other object refernce to make this element relative to. in Anchor


parent (Element)

You can define another parent for an element. To make button around minimap you can move it inside minimap frame that way. I'm not sure do element really removed from this one, or it just defines drawing order. If skipped then parent is container of element

protected (bool)

Can be defined only in blizzard interface files (At least no one checked yet). If set to true some special api functions can be used. Any element inherited from protected ones can use this functions too. Protected functions/actions cannot be circumvented with this attribute.

resizable (bool)

If true element can be resized. Default false


scale (float)

Sets the scale. Default is the parent's scale. Accepts values greater than and not equal to 0.

setAllPoints (bool)

Attaches all four corners to the parent's inner corners.

text (string)

Used to define text to show on buttons, fontstrings etc.


Name of an element to use as this elements target. in Animation.


Name of a parentKey object refernce to use as this elements target. in Animation.


valuestep (float)

Tells a slider how far to jump per click.

virtual (bool)

If true element will not created, but used as template for other elements. Default false


Size (Dimension)

Defines a size of an element. Normally this is done by putting "AbsDimension" tag inside with "x" and "y" attributes, but sometimes this is done by just giving "x" and "y" attributes to "Size" tag itself. Last one is probably old way of defining and left for a backward compatibility.


A list of Anchors that defines position of element relative to its parent position.


A list of AnimationGroups that define arbitrary animations for a target element.

TitleRegion (LayoutFrame)

Adds a region used for automatically dragging a frame.


Define how big or small this frame can possibly be.


Provides a background for a frame.

HitRectInsets (Inset)

Alters the user input hit box for a frame.


This is a place where actually defined what will be drawn on screen. If this tag omitted default representation is taken (this needs to be tested). Only "Layer" elements can be inside this tag, each have "level" property to define the order they will be drawn. Only fontstring and texture elements are allowed inside Layer element.


A list of Attributes that add members to the Lua object for the element.


Inside this tag all child elements are located. So if you want button inside a frame you need put it inside this tag of frame.


This tag only accepts Category:Widget event handlers.

Still for some elements there is extra tags where elements can be placed. This depends completely on element type


Determines how much of the specified texture is to be shown. There are four specifications: "left", "right", "top", and "bottom". Each one specifies the coordinates of what the image should show, using a scale value. IE: With left=0 and right=1, it would show all the pixels from the left side to the right, or 100% of the image's width.

<TexCoords left="0" right="0.5" top="0" bottom="0.5" />

This example shows only the top left quarter of the texture.




FontHeight (Value)


Puts a shadow behind an element.










Define the texture to use when a check button is checked.


Define the font to use when a button is disabled.


Define the texture to use when a button is disabled.


Mouseover font.


Mouseover texture.




Text moves when clicked (and held), this defines how far it moves. Text moves back to its previous location when the mouse button is released.


Change the texture to this when clicked (and held). The texture changes back to its texture when the mouse button is released.



Around Wikia's network

Random Wiki