ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Control:SetAnchor() Clarification (https://www.esoui.com/forums/showthread.php?t=294)

alfpogs 03/16/14 01:41 PM

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?

Seerah 03/16/14 01:56 PM

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.

alfpogs 03/16/14 02:10 PM

Thanks for the reply, that makes perfect sense.


All times are GMT -6. The time now is 09:39 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI