LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scroll a text indicator have to scroll up and down

Solved!
Go to solution

Hello

 

I read serial port device communication outputs on a string indicator box.

As the string response is received, I append line feed character and display output.

User wants to see the latest text string as the last line in the string indicator.

For this I have wired text scroll position property node as -1

So the last line is always seen in the text indicator.

The vertical scroll bar is shown. When the text indicator is updating continuously, user also scrolls vertical scroll bar with mouse. So the text indicator should scroll up.

But the scroll comes to last line. It does not allow user to scroll up even if the mouse is held down.

If user uses mouse and scrolls up, then the indicator should allow to scroll up and display the previous line data.

If no mouse scroll action then last line should be shown.

I am using LabVIEW 2016 and also LabVIEW 2019

Please let me know.

 

Thank you

 

0 Kudos
Message 1 of 7
(1,566 Views)

Unfortunately, that's how it works.  As long as you keep updating the box - which is "always", your code will set the cursor to the last line and append.  The way I got around that is to use a listbox, instead.  But that comes with its own problems (like word wrap).

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 7
(1,550 Views)

Put in a small boolean that is a flag for "Autoscroll".  The user can set it to false if he wants to scroll.  Put the property node for scroll position in a case structure controlled by that boolean flag.

0 Kudos
Message 3 of 7
(1,539 Views)

@RavensFan wrote:

Put in a small boolean that is a flag for "Autoscroll".  The user can set it to false if he wants to scroll.  Put the property node for scroll position in a case structure controlled by that boolean flag.


Well, that's just dumb.

 

ON MY PART!  I didn't even think to use that property.  Oh, well, I never claimed to be exceptionally bright.  Just exceptionally lucky to have people on this forum brighter than me.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 7
(1,490 Views)
Solution
Accepted by topic author hemalathagopal

Try with this. Autoscroll is stopped when the mouse button is pressed and the pointer is in the indicator area. It's restarted when the mouse button is released or the mouse pointer goes outside the indicator area.

It may not be exactly what you want, but very near I think.

 

Auto-autoscroll.png

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 7
(1,486 Views)

Thank you..

That works

0 Kudos
Message 6 of 7
(1,481 Views)

This should do it for you.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 7
(1,460 Views)