Matt
Matt

Reputation: 3061

How to get the width of a word in a dynamic textfield?

I have a dynamic textfield that gets filled with a random word and I would like to add an add the end of the word with a 10px space in between. How to get the word width in the textfield?

Upvotes: 1

Views: 47

Answers (1)

Daniil Subbotin
Daniil Subbotin

Reputation: 6718

TextField class has textWidth property. Use this property to get the width of the word in a dynamic TextField.

Upvotes: 1

Related Questions