WoW:API Region GetHeight: Difference between revisions

(Put both GetHeight / GetWidth documentation here.)
Line 11: Line 11:
== Example ==
== Example ==
  myAddonOptionsParent = myAddonOptions:GetParent();
  myAddonOptionsParent = myAddonOptions:GetParent();
  myAddonOptions:SetWidth('''myAddonOptionsParent:GetWidth()''' / 2);
  myAddonOptions:SetHeight('''myAddonOptionsParent:GetHeight()''' / 2);


=== Result ===
=== Result ===
: The frame named "myAddonOptions" would be set to half the width of its parent frame.
: 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.
Anonymous user