The width of a drawing area is generally only set with the second (same) command. Why?

Can you provide an example text?
Also I did not understand, what exactly you are calculating?

Are you looking for the length of the text? But why don't you just use the length method from the text drawer?

Is this an empty text block or is there an empty string inside?
Screenshot_20240820_134209_DuckDuckGo

It would be nice to switch the language to English before taking a screenshot...

Generally Use the companion app and Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.