Widget API: FontString:GetStringWidth

Revision as of 04:45, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API FontString GetStringWidth to API FontString GetStringWidth without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Widget API ← FontString < GetStringWidth

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

width = MyFontString:GetStringWidth();

NoteEdit

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.