API CreateFrame

Creates a new object. frame = CreateFrame(frameType [, name, parent, template, id])

Arguments

 * frameType : - Type of the frame e.g. "Frame" or "Button".
 * name : string ? - Globally accessible name to assign to the frame, or  for an anonymous frame.
 * parent : Frame ? - Parent object to assign to the frame, or  to be parentless; cannot be a string. Can also be set with
 * template : string ? - Comma-delimited list of virtual frames to inherit from. See also the Complete List of FrameXML templates.
 * id : number ? - ID to assign to the frame. Can also be set with

Returns

 * frame : Frame - The created Frame object or one of the other frame type objects.

Frame types
Possible frame types are available from the UI.xsd file.

Details

 * Frames cannot be deleted or garbage collected, but they can be reused/recycled.
 * There technically is a way to destroy frames by parenting them to a user waypoint frame and going through a loading screen transition.


 * Fires the frame's script, if it has one from an inherited template.

Examples

 * Shows a texture which is also parented to UIParent so it will be hidden when toggled with


 * Creates a button which inherits textures and widget scripts from UIPanelButtonTemplate


 * Displays an animated model for a DisplayID.


 * Registers for events being fired, like chat messages and when you start/stop moving.