0

I need to wrap text nicely. E.g. "WWWW WWWW" takes more space than "1111 1111". I have a design to make a for loop and add words one by one and see if text is too long to fit the row.

How to count properly the text.textWidth() without drawing text to the screen 1st?

System.Wait() seems to be required to make textwidth value refresh, is there any workaround for this? I don't want to add sleep into for loop, it would take ages.

Tom
  • 6,725
  • 24
  • 95
  • 159

1 Answers1

-1
len(text.text) to count the text, use len(str(text.text)) if combinated number and text

checkout full documentation here