View Single Post
11-02-10, 06:23 AM   #12
Xubera
A Cobalt Mageweaver
 
Xubera's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 207
Does the <Size x="0" y="64"/> attribute correspond to the Height Width? Or is in the SetPoint()?
Actually, frame's dont really have a size. a frame has 4 points, TOP, LEFT, RIGHT, and BOTTOM

if you say your frame has a size of x=32 and y=32 then say :SetPoint("CENTER") then what it does is set the top y/2 (16 in this case) points from the center of the designated point, sets the left 16 points to the left and so on.

by saying
:SetPoint("TOPLEFT") with the size x=32 and y=32
we are setting the left and top points of the frame to 0, and the bottom and right part to 32 px away.


so lets say

Code:
local frame = CreateFrame("Frame", "myFrame", UIParent)
frame:SetPoint("TOPLEFT")
frame:SetPoint("BOTTOMRIGHT")
you have set all 4 points of the frame to match its parent (UIParent). Since all 4 points are set, the frame is visible

if you did
Code:
local frame = CreateFrame("Frame", "myFrame", UIParent)
frame:SetPoint("TOPLEFT")
by itself, well since you didnt declare a size, it has no way to know where you want a bottom and right point to be, so the frame wont appear

so you can declare any frame with only anchors if you want, just as long as all 4 points are declared. which can be called in 2 commands with TOPLEFT and BOTTOMRIGHT or TOPRIGHT and BOTTOMLEFT

and a frame can be declared with a width and height as long as one point is given. and then wow will figure out the rest

hopefully i didnt confuse :< if i did, sorry
__________________
Chat Consolidate is the solution to any out of control trade chat. Ignore lines, throttle chat, consolidate posts!Follow the link to find out how!

▲ ▲ WoWInterface wont let me triforce >.>
  Reply With Quote