View Single Post
10-29-10, 12:01 PM   #17
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
Originally Posted by Taryble View Post
There is no MoveTo command. You can use SetPoint instead, read it's info on WowPedia.

obj:SetPoint(point, relativeFrame, relativePoint, ofsx, ofsy);

point is the point on the frame that you're using for the location.
Code:
Points
There are nine valid point values: 
"TOP", "RIGHT" "BOTTOM" "LEFT": the center-points of the respective sides. 
"TOPRIGHT", "TOPLEFT", "BOTTOMLEFT", "BOTTOMRIGHT": corners of the frame rectangle. 
"CENTER": the center point of the frame rectangle.
relativeFrame is what frame you're setting this point relative to (I usually use UIParent).

relativePoint is the point on the above frame that you're offsetting FROM. Uses the same "point" values as above.

ofsx is the x-offset from relativepoint to point - basically, how far away, horizontally, is the point you're setting from the relativePoint.

ofxy is the y-offset - how far away, vertically, is point from relativePoint.

Example (I use these two lines to define the bottom left and top right points of my chatframe).
Code:
    ChatFrame1:SetPoint("BOTTOMLEFT", "UIParent", "BOTTOMLEFT", 63, 32)
    ChatFrame1:SetPoint("TOPRIGHT", "UIParent", "BOTTOMLEFT", 440, 177)
The first line says that I'm setting the Bottom-Left point of ChatFrame1 to a spot that's 63 right and 32 up from the Bottom-Left point of UIParent.

The second line says that the Top-Right of ChatFrame1 is being set to a spot that's 440 right and 177 up from the Bottom-Left point of UIParent.

When you use it to place your Bartender4 bars, you should just be able to place one point, instead of both (my above code also sets the window to a specific size, by setting opposite corners).

Ah, okay, i understand!
And you've shown me a way to define my chat-size - awesome

Thanks!
__________________
  Reply With Quote