WoW:API FontString GetStringWidth: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
(Unstubbified. Point at object information for GetWidth et al funkiness)
Line 1: Line 1:
Returns the width of the string in pixels. The Questwatcher uses this to determine the "dynamic" placement of the quest watcher.
{{widgetmethod}}


{{template:WoW API}}
Returns how wide the string would be, in pixels, without wrapping:
width = MyFontString:GetStringWidth();
 
== Note ==
 
Get/SetWidth() and Get/SetHeight() operate very differently on FontString objects than they do in other objects.
 
Among other things, if no width is explicitly set, GetWidth() will return the exact same result as GetStringWidth().
 
See the [[UIOBJECT FontString|FontString object information]] for details.

Revision as of 03:28, 22 July 2006

Widget API ← FontString < GetStringWidth

Returns how wide the string would be, in pixels, without wrapping:

width = MyFontString:GetStringWidth();

Note

Get/SetWidth() and Get/SetHeight() operate very differently on FontString objects than they do in other objects.

Among other things, if no width is explicitly set, GetWidth() will return the exact same result as GetStringWidth().

See the FontString object information for details.