Frame is in many ways the most fundamental widget object. Other types of widget derivatives such as FontStrings, Textures and Animations can only be created attached to a Frame or other derivative of a Frame. Frames provide the basis for interaction with the user, and registering and responding to game events.

When an addon needs to respond to game events or state changes and needs no visible components, this is typically accomplished using a Frame. Visibly, widgets that display game information such as threat or cooldowns and aren't directly interactive beyond being draggable are typically Frames. They are also commonly used as ways to group other related frames, either visibly (such as the way the Talents pane groups the buttons representing your character's talents) or invisibly (such as the way MultiBarRight groups twelve action buttons).

You create a plain frame by specifying "Frame" as the first argument to CreateFrame, or with a <Frame> element in an XML file:

 -- Create a new frame in Lua
 local self = CreateFrame("Frame", "FunWidget", UIParent)

 <Frame name="FunWidget" parent="UIParent">
   <!-- insert anchors, scripts, children and other components here in XML -->

Frames in the FrameXML include the action bars (the frames that group the action buttons together), the panels that display information like your character status and quest log, and the grand-daddy of the rest of the UI, UIParent.

Defined Methods

Inherited Methods

Script Handlers