Problem with getting width after changing text

Hi,
I found a very annoying bug, please fix it.
the bug:
I set my default text label to "test".
image
than I show in alert the width of the lable.
until here everything fine.
after it I changed the text of the lable to "test2".
now the width need to be longer then the first one.
but here is the bug, is NOT longer then the first one, it is like the first one.

image

it seems that if you changing text and then immediately getting the width so it is not give you the real width.
is it really a bug? or it is just on my phone?
please fix it.

someone?

The same response than in the other topic....use a clock, and give it a little interval.

My final mission is to find when a random text join with spaces and then after spaces the word connect. I need to find what is the maximum spaces need that the lable width will be smaller from 50% of the screen. How can i do it?

Do you need to know the number of spaces or only to align the label text to the right?

Your job would be much easier if you use a monospace font.

Here's a little tool to grab widths, if you want to build a dictionary of character widths.

Beware of kerning, which fits some character pairs closer than the sum of their individual widths.

blocks
demo


text_width.aia (2.0 KB)

I am trying like in list view to make one text in the left and text "connect" in the right

You have any Idea for this?

Ok, thanks
I will try it tomorrow

Are you referring to a label on the left edge of the screen and another label attached to the right edge of the screen? like this?

Like this but with list view

I would use CompCreator for this, and build my own listview with labels to the left and right

What is CompCreator?

also

Have you found the search button on the community yet ? (Hint: top right of screen)

1 Like

Ok, thank you for the reply