Thread Tools Display Modes
03/16/14, 01:41 PM   #1
alfpogs
 
alfpogs's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 2
Control:SetAnchor() Clarification

I was wondering if anyone would be able to clear this up for me.

In the documentation for the Control class' SetAnchor() method on the wiki, it states the second parameter - anchorTargetControl - is simply an object.

Which type of object is that supposed to be? Is it an instance of a Control's anchor element, or of the Control itself, or something else? And what would be the best way to get that object?
  Reply With Quote
03/16/14, 01:56 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
That control/object/frame can be whatever you want to anchor your control to. Where you want your control's location to be based off of.

If you want to anchor your window to the whole screen in general, the name of that frame is GuiRoot. If you want to anchor your window to the chat frame, you'd use the name of that. If you want to anchor your window/button/whatever to the bag window, you'd use the name of that.
  Reply With Quote
03/16/14, 02:10 PM   #3
alfpogs
 
alfpogs's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 2
Thanks for the reply, that makes perfect sense.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Control:SetAnchor() Clarification


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off