LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wrap text from bottom to top

How can I implement text wrapping from the bottom to the top in LabVIEW? I'm looking for a solution to format my text in a way that it starts at the bottom of a text box or display area and wraps upwards, rather than the standard top-to-bottom approach.

0 Kudos
Message 1 of 8
(663 Views)

So your text is one long string without line delimiters and you want it to dynamically re-wrap if the font size or indicator dimensions are changed?

 

I assume you are talking about an indicator, not a control, right?

 

The math will be a bit easier if you use a fixed width font (e.g. Consolas).

 

Can you explain the purpose of all this?

 

If each line is a linefeed delimited string to be dynamically appended to the indicator, all you might need is concatenate the new data on top.

0 Kudos
Message 2 of 8
(635 Views)

Try this.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 8
(625 Views)

Saved by "going through a tunnel".

 

I (carelessly) read this post, and thought the Original Poster had a ListBox (which is what I thought he meant by "Text Box") and wanted to present it with the initial Selected Item the last item in the list (instead of the first).  By the time I got off the train and was able to set up my laptop again, I saw the posts from Christian and Paul, and figured out that I was "answering the wrong question".

 

Bob Schor

0 Kudos
Message 4 of 8
(621 Views)

@paul_cardinale wrote:

Try this.


That's a bit of a hack, because applying the operation twice does not restore the original string as one might foolishly expect. Might be OK is some use cases.

 

(Easiest to demonstrate by repeating the operation a couple of times. We get more and more empty lines in-between the text lines. Not easy to fix.)

0 Kudos
Message 5 of 8
(607 Views)

@altenbach wrote:

@paul_cardinale wrote:

Try this.


That's a bit of a hack, because applying the operation twice does not restore the original string as one might foolishly expect. Might be OK is some use cases.

 

(Easiest to demonstrate by repeating the operation a couple of times. We get more and more empty lines in-between the text lines. Not easy to fix.)


OK.  Just remove the concatenation of the End of Line Constant and it will work as you like.

paul_a_cardinale_0-1707061091533.png

 

0 Kudos
Message 6 of 8
(572 Views)

Even then, applying the operation twice (or any even times) does not return to the original text in general but scrambles the words.

 

altenbach_0-1707063555839.png

 

We still need to hear from the OP to see what problem should actually be solved.... 😄

0 Kudos
Message 7 of 8
(565 Views)

This seems to work.

"If you weren't supposed to push it, it wouldn't be a button."
Message 8 of 8
(495 Views)