Phone API Reference - UI Classes (Widgets) - Text - fitLabel
fitLabel
Description
Resizes the box around the widget to fit it to the contents. A padding argument is optional, to add additional pixels on each side of the text.
Basic Example:
|
Note: if a text widget is aligned with Widget.WRAP, fitLabel() will not alter its width.
...
fitLabel for a text widget with a 2 pixel padding
|