How to set text limit in label component

can we set the text limit in label component

like i fave a text and i want to show only first 5 words on text

is this possible ?

You can use segment text block for this.
image

3 Likes

ok thanks let me try

Selectie_999(577)

This will look at a changing textbox so when you are entering text. If it is longer then 5 characters it will just display the first five characters and put the cursor at the end.

Oh wait you want to show the first five words of a sentence in a label.

This block makes a list while splitting a sentence assuming words are split by spaces, then glues together the first five words and ads another space between the words

Anyone a better way of doing this?.

2 Likes

This is my solution to the problem.

6 Likes

Thanks peter hope it will work in my app

1 Like

I use this in an application to limit the number of characters of a variable to 15.

Because I use it to create a Sqlite database, I replace the spaces with an underscore.

limite%20de%20caracteres2

Where it says “Segment” there is a space

1 Like