WoW:API Region SetAllPoints: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
(Formatting)
Line 1: Line 1:
Equivalent to:
{{widgetmethod}}


frame:SetPoint("TOPLEFT",parentFrameName,"TOPLEFT",0,0)
Sets an object to be positioned and sized exactly the same as another object.
frame:SetPoint("TOPRIGHT",parentFrameName,"TOPRIGHT",0,0)
frame:SetPoint("BOTTOMLEFT",parentFrameName,"BOTTOMLEFT",0,0)
frame:SetPoint("BOTTOMRIGHT",parentFrameName,"BOTTOMRIGHT",0,0)


{{template:WoW API}}
MyObject:SetAllPoints(frame or "frameName")
 
... is exactly equivalent to:
 
MyObject:SetPoint("TOPLEFT",frame ,"TOPLEFT",0,0)
MyObject:SetPoint("TOPRIGHT",frame ,"TOPRIGHT",0,0)
MyObject:SetPoint("BOTTOMLEFT",frame ,"BOTTOMLEFT",0,0)
MyObject:SetPoint("BOTTOMRIGHT",frame ,"BOTTOMRIGHT",0,0)
 
* See [[API Region SetPoint|Region:SetPoint]]()
* ''frame'' may be given as nil to anchor relative to the whole screen.

Revision as of 16:02, 29 July 2006

Widget API ← Region < SetAllPoints

Sets an object to be positioned and sized exactly the same as another object.

MyObject:SetAllPoints(frame or "frameName") 

... is exactly equivalent to:

MyObject:SetPoint("TOPLEFT",frame ,"TOPLEFT",0,0)
MyObject:SetPoint("TOPRIGHT",frame ,"TOPRIGHT",0,0)
MyObject:SetPoint("BOTTOMLEFT",frame ,"BOTTOMLEFT",0,0)
MyObject:SetPoint("BOTTOMRIGHT",frame ,"BOTTOMRIGHT",0,0)
  • See Region:SetPoint()
  • frame may be given as nil to anchor relative to the whole screen.