Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:XML/Anchor
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Default References === This is one of those things you wish you could explain at the beginning, but needs to be at the end. :) Each of these are, in the general case, equivalient: <pre> <[[XML/Anchor|Anchor]] point="TOPLEFT" /> </pre> <pre> <[[XML/Anchor|Anchor]] point="TOPLEFT" relativeTo="$parent" /> </pre> <pre> <[[XML/Anchor|Anchor]] point="TOPLEFT" relativeKey="$parent" /> </pre> In each case the relative frame is parent. For the default case, the relative frame its the parent. For 'relativeTo', a named parent frame's full name will replace '$parent' causing 'relativeTo' to refer to the parent frame by name. For 'relativeKey', the named or unnamed parent frame's Lua 'reference' will be used as the relative frame, similar to 'self.GetParent()'. However as of 5.2, this will bug and *not* be equivalent of either '$parent' or 'self': <[[XML/Anchor|Anchor]] point="TOPLEFT" relativeKey="" /> In this case will ignore all size and anchors, and act as though layout was 'setallpoints' with this frame same size and position as parent, Also, as of 5.2, May 13 2013, following may/will crash WoW: <[[XML/Anchor|Anchor]] point="TOPLEFT" relativeKey="$parent.$parent.AccidentallyOnUIParent" /> Where Frame is top frame with no parent and contains a LayerFrame with above anchor, which would effectivly be asking for key on parent of UIParent, since the frame is using the default parent. This is exceedingly easy to accidentally set, or move a frame where some child asks UIParent instead of intended parents parent. So: <Frame><Layers><Layer><Texture><Anchors><Anchor ...CENTER relativeKey=$parent.$parent.Key"/>... will crash, but not <Frame><Frames><Frame><Layers><Layer><Texture><Anchors><Anchor ...CENTER relativeKey=$parent.$parent.$parent.Key"/>... or <Frame parent="UIParent"><Layers><Layer><Texture><Anchors><Anchor ...CENTER relativeKey=$parent.$parent.$parent.Key"/>... and it doesnt matter in any of the cases if the key exists or not. And finally, for 'relativeTo' below, in the case where the immediate parent doesn't actually have a 'name': <[[XML/Anchor|Anchor]] point="TOPLEFT" relativeTo="$parent" /> ... will *not* be equivalient to: <[[XML/Anchor|Anchor]] point="TOPLEFT" /> ... and will look for a parent with a name up the hierarchy until finds, or hits UIParent which is always named.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)