Wikia

WoWWiki

API Region GetHeight

Talk0
98,461pages on
this wiki
Revision as of 04:03, June 10, 2010 by Mortilus (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)

Gets the height and width, respectively, of an object.

dimension = MyObject:GetWidth();
dimension = MyObject:GetHeight();

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 :SetHeight() / :SetWidth(), or the actual height/width used if computed from two or more :SetPoint() calls.

Example

myAddonOptionsParent = myAddonOptions:GetParent();
myAddonOptions:SetHeight(myAddonOptionsParent:GetHeight() / 2);

Result

The frame named "myAddonOptions" would be set to half the height of its parent frame.

Notes

Note that even though FontString has GetWidth()/GetHeight() methods, they behave very differently and have potentially very little to do with the displayed dimension.

Advertisement | Your ad here

Photos

Add a Photo
61,978photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki