LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

When and How to get the Text.ScrollPos value of a String control when scroll bar position changed

Hi, 

 

I'm working on a feature triggered by scroll bar position of a string control changed.

But I could not find a good way to catch the scroll bar position changed event, 

the scroll bar is controlled manually by mouse down → mouse move → mouse up, I want the get the Text.ScrollPos value when user mouse up, and compare with the maximum value.

But the problem is,  mouse up on the scroll bar could not trigger String: Mouse up event!

So I have to get the Text.ScrollPos continuously in the background in Timeout event, but I think it’s not efficient.

Do you have any better idea on when to get the correct destination value of Text.ScrollPos?

 

I plan to store the value of Text.ScrollPos in the bottom(maximum value) in a shift register, then compare the current Text.ScrollPos value with the max one.

If it comes close to the bottom(90%~100% of the maximum value), then the close to bottom LED will turn on.

 

0 Kudos
Message 1 of 2
(3,123 Views)

Hello Cecilia,

 

I don't think there is any build-in event for this.

One solution would be to create your own user event at the initialisation of you main and launch a thread which is going to be pulling the value of your scrollbar position:Scrollbar event.PNG

Then you can build your main as if they were a scrollbar move event.

And dont forget to close the thread and destroy the event at the end.

Hope it helps.

0 Kudos
Message 2 of 2
(3,089 Views)