LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String Control: How to automatically update to the lastest string entry

Hi people,

Question:
[String Control:] How to automatically update to the lastest string entry?

Background:
I am writing status information to the string control, which is updating on a per second basis.
The string control is updated with the lastest entries at the bottom of the string control.
After some updating, i am not able to see the lastest entries and have to scroll down manually.

Are there any way i can do, to make the scroll bar always at the bottom position of the string control,
marked by "B" in the attached picture?

thanks for your helps Smiley Very Happy


Message Edited by issac on 03-11-2008 11:05 PM
0 Kudos
Message 1 of 22
(3,751 Views)
You can create a property node of that string called Text.ScrollPos.  Write a value to it equal or larger than the number of lines that you have in the string.  It will move the scrollbar to the end.


Message Edited by Ravens Fan on 03-12-2008 12:49 AM
Message 2 of 22
(3,745 Views)

One more way to do it.

Look at attached Post

 

Message 3 of 22
(3,729 Views)
The original problem has been solved with the above replies.
 
Still, you might consider updating the string in such a way that the newest entries are appended at the beginning instead of the end so the newest entry is always on the first line. Sometimes, this is a better solution.
 
One problem with the "scroll position" solutions is the fact that the user will have a hard time scrolling, e.g. if there is a need to look at older entries because the propertry node is constantly fighting with the user interaction. This can be very annoying!
Message 4 of 22
(3,726 Views)

Hi Dev,

Is the Text.Document Bounds:Height property a private one in LV 8.5? Smiley Surprised

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 5 of 22
(3,712 Views)


altenbach wrote:
 
One problem with the "scroll position" solutions is the fact that the user will have a hard time scrolling, e.g. if there is a need to look at older entries because the propertry node is constantly fighting with the user interaction. This can be very annoying!


That's a good point.  I've come across that problem in professionally built applications completely unrelated to LabVIEW.  The user could wrap the scroll position with a case structure that is tied to an Unlock Boolean button.    If they press the button, the case doesn't execute and they'd be free to scroll.  When done, they press the button again to relock it and the scroll position code can execute again.
0 Kudos
Message 6 of 22
(3,696 Views)
Hi Partha,
 
Nope, the Text.DocumentBounds: Height is not Private
It is available to the users
 
Look at attached pic
 
 
 
0 Kudos
Message 7 of 22
(3,673 Views)
hi folks,

thanks for the sharing. Smiley Very Happy
Will continue to explore the string control and property node.

:) cheers,
Issachar
Smiley Wink
0 Kudos
Message 8 of 22
(3,667 Views)

Dev,

Sorry to say that many of your propertiers are not present in my LV 8.5, though it is an evaluation version. I ve checked in PDS also.

See the attached pic. Smiley Happy

Are you using some NI's internal version of LV or is it 8.51 or 8.6 beta? Smiley Wink

Moreover, your pic shows that you ve got Property of Property nodes & Locals also for a string control. Smiley Happy

Maybe, you ve to explain me more of those secrets. Smiley WinkSmiley Very Happy

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 9 of 22
(3,666 Views)

Here's a clue. 😉



Message Edited by altenbach on 03-12-2008 11:39 PM
Message 10 of 22
(3,661 Views)