Any way to flip the order of lines on a label?

I have a dynamically sized label that is based on user input. When the input is received and the text is to be rendered on the label and if it is multi-line, I want the order of the lines to be reversed. For examples like this.

User input:

Text goes here

Output, due to say text wrap:

Text
goes
here

I want to reorder the lines based on the label’s width to become:

here
goes
Text

If you’re wondering what this is for, it’s for Arabic text. Since the plugin I’m using only reorders the words in a string, I’ll need to manually flip the lines.

Hi @khorozian2 !

Our current implementation of RTL is trivial, it only reverses the string so it’s not what you are looking for. I took good notes of your request to make sure we can add this once we properly tackle RTL. If you are interested in learning more about RTL support, this post has more information.

Here’s the result:

So hopefully those features will also come to UI Toolkit, right? Thanks

We can’t commit to an eta, but yes, it’s on the roadmap!

1 Like