- Documentation
- Client functions
- guiLabelGetTextExtent
Function
guiLabelGetTextExtent
Returns the width of a label's text in pixels.
Syntax
float guiLabelGetTextExtent(gui-label theLabel)Arguments
theLabelgui-label- The label.
Returns
Width.
Example
local w = guiLabelGetTextExtent(label)
guiSetSize(label, w, guiLabelGetFontHeight(label), false)