WoW:API Region SetAllPoints: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(added a basic definition)
 
m (Move page script moved page API Region SetAllPoints to API Region SetAllPoints without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
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)
  MyObject:SetAllPoints(relativeRegion or "regionName")  
frame:SetPoint("BOTTOMRIGHT",parentFrameName,"BOTTOMRIGHT",0,0)
 
... is exactly equivalent to:
 
  MyObject:SetPoint("TOPLEFT", relativeRegion ,"TOPLEFT", 0, 0)
  MyObject:SetPoint("BOTTOMRIGHT", relativeRegion ,"BOTTOMRIGHT", 0, 0)
 
* See [[API Region SetPoint|Region:SetPoint]]()
* ''region'' may be given as nil to anchor relative to the whole screen.
* ''region'' unspecified anchors the object to the parent.

Latest revision as of 04:47, 15 August 2023

Widget API ← Region < SetAllPoints

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

MyObject:SetAllPoints(relativeRegion or "regionName") 

... is exactly equivalent to:

MyObject:SetPoint("TOPLEFT", relativeRegion ,"TOPLEFT", 0, 0)
MyObject:SetPoint("BOTTOMRIGHT", relativeRegion ,"BOTTOMRIGHT", 0, 0)
  • See Region:SetPoint()
  • region may be given as nil to anchor relative to the whole screen.
  • region unspecified anchors the object to the parent.