WoW:API FontString GetStringWidth: Difference between revisions
Jump to navigation
Jump to search
(Returns the width of the string in pixels.) |
m (Move page script moved page API FontString GetStringWidth to API FontString GetStringWidth without leaving a redirect) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Returns | {{widgetmethod}} | ||
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. |
Latest revision as of 04:45, 15 August 2023
← Widget API ← FontString < GetStringWidth
Returns how wide the string would be, in pixels, without wrapping:
width = MyFontString:GetStringWidth();
Note[edit]
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.