LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Scroll Text Properties

I have a string indicator with a scroll bar on the side.  Each line that is written displays underneath the previous line.  However, when it gets to the bottom (8th line), it does not auto scroll up.  Therefore, I have to use the scroll bar to see what was last written.  Is there a property that allows me to control this so that the last item added always displays?

Download All
0 Kudos
Message 1 of 10
(4,736 Views)

Hello,

 

there is a property 'Text.Scroll Position'. Wire -1 to it to show the last line of text.

 

UliB

0 Kudos
Message 2 of 10
(4,722 Views)

Set Text.ScrollPos to the number of letters in your indicator, and the scroll position will move to the last line.

If you do not know the number of letters, read Text.Text and find the string length.

0 Kudos
Message 3 of 10
(4,717 Views)

I read about the -1.  However, the type is U32 and it won't let me use the -1

 

0 Kudos
Message 4 of 10
(4,705 Views)

-1 will cast to the maximum size of U32, which will have the same effect as setting it to the length of the text in the indicator.

But I think setting it to the actual length is more correct since it does not hide what is actually happening.

0 Kudos
Message 5 of 10
(4,697 Views)

Well,

-1 in I32 will convert to 4294967295 in U32. If you always want the last line wire a I32 constant with -1 to the property.

 

UliB

0 Kudos
Message 6 of 10
(4,695 Views)

I tried some of the suggestions, and they don't seem to work.  One question, though, can I set the Text.ScrollPos attribute once (at the beginning) and be done? Or do I have to set it each time I write to it?

0 Kudos
Message 7 of 10
(4,654 Views)

The property node updates the display when you call it, so you should call 'Text.Scroll Position' every time after you updated your text.

You could use property 'value' and property 'Text.Scroll Position' in one property node.

 

UliB

0 Kudos
Message 8 of 10
(4,642 Views)

It could be like this:

 

 

 

UliB

0 Kudos
Message 9 of 10
(4,630 Views)

That seems to work now!  Thanks for all the help

0 Kudos
Message 10 of 10
(4,607 Views)