m
Move page script moved page API Region GetHeight to WoW:API Region GetHeight without leaving a redirect
(Put both GetHeight / GetWidth documentation here.) |
m (Move page script moved page API Region GetHeight to WoW:API Region GetHeight without leaving a redirect) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{widgetmethod}} | {{widgetmethod}} | ||
Gets the height and width, respectively, of an object. | Gets the height and width, respectively, of an object. | ||
| Line 6: | Line 5: | ||
dimension = MyObject:GetHeight(); | dimension = MyObject:GetHeight(); | ||
== Returns == | == Parameters == | ||
=== Arguments === | |||
=== Returns === | |||
* dimension (number) - height/width of the object in pixels, in its own coordinate space (scaling dependent). This is the desired height/width, if set with [[API Region SetHeight|:SetHeight]]() / [[API Region SetHeight|:SetWidth]](), or the actual height/width used if computed from two or more [[API Region SetPoint|:SetPoint]]() calls. | |||
== Example == | == Example == | ||
myAddonOptionsParent = myAddonOptions:GetParent(); | myAddonOptionsParent = myAddonOptions:GetParent(); | ||
myAddonOptions: | myAddonOptions:SetHeight('''myAddonOptionsParent:GetHeight()''' / 2); | ||
=== Result === | === Result === | ||
: The frame named "myAddonOptions" would be set to half the | : The frame named "myAddonOptions" would be set to half the height of its parent frame. | ||
== Notes == | == Notes == | ||
Note that even though [[UIOBJECT FontString|FontString]] has GetWidth()/GetHeight() methods, they behave very differently and have potentially very little to do with the displayed dimension. | Note that even though [[UIOBJECT FontString|FontString]] has GetWidth()/GetHeight() methods, they behave very differently and have potentially very little to do with the displayed dimension. | ||