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!
=== Relative References === Frames can have names. This allows an 'anchor' to reference a frame by its name for relative layout using 'relativeTo'. The 'relativeTo' attribute can contain a replacable tag '$parent' for refereing to another frame without actually having to know its direct parents name, like '$parent3' would refrence 'Frame3' if the parent's name was 'Frame'. This is useful for allowing cleaner code, as parent frame's names could be changed without disturbing the layout. This is even more important with templates as a template may have no way of knowing its parents names and could still access known relative elements by name. <Frame name="FrameTemplate" virtual='true'> <Frames> <Frame name="$parent2"> <Size x="100" y="100"> <[[XML/Anchors|Anchors]]><[[XML/Anchor|Anchor]] point="TOP" relativePoint="BOTTOM" x="0" y="-10" /></Anchors> </frame> <Frame name="$parent3"> <Size x="50" y="50"> <[[XML/Anchors|Anchors]]><[[XML/Anchor|Anchor]] point="TOPLEFT" relativeTo="$parent2" /></Anchors> </frame> </Frames> </Frame> <Frame name="Frame" inherits="FrameTemplate" /> This works the same as the last example, but using a tmplate with all manner of relative anchors and names. <Frame name="FrameTemplate" virtual='true'> <Frames> <Frame parentKey="frame2"> <Size x="100" y="100"> <[[XML/Anchors|Anchors]]><[[XML/Anchor|Anchor]] point="TOP" relativePoint="BOTTOM" x="0" y="-10" /></Anchors> </frame> <Frame parentKey="frame3"> <Size x="50" y="50"> <[[XML/Anchors|Anchors]]><[[XML/Anchor|Anchor]] point="TOPLEFT" relativeKey="$parent.frame2" /></Anchors> </frame> </Frames> </Frame> <Frame name="Frame" inherits="FrameTemplate" /> This works the same as the last example, but using lua runtime based 'keys' instead of names.
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)