LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with vertical scrollbar

Hi i am having a problem with the using the mouse wheel to scroll through a string indicator
 
I have some ouput in a string and i would like to be able to use the mouse wheel to scroll through it.  So i placed an Inicialize Mouse .ve and Acquire input data to scroll and it works but very glichy
 
If i then use the mouse to scroll up and down the string using the mousepointer (i.e. by clikcing on the verticall scroll bar and moving it up and down) the string scroll bar vibrates up and down and is very unstable.  This only happens after i have used the mouse wheel to scroll, see if you can duplicate my problem
 
Is there any fix to this or is there anyway i can improve on my vi. 
 
 
0 Kudos
Message 1 of 6
(3,806 Views)

Can you save as LV 8.2?  I unfortunately could not open your VI (LV8.5).

RayR

0 Kudos
Message 2 of 6
(3,802 Views)

sure thing,

hope that helps

Message 3 of 6
(3,797 Views)
The problem only used to occur if you tried to scroll by dragging the scrollbar while the cursor was showing in the text box. If you click outside of the box, and then try to scroll, the problem does not happen. This was because you were sending a conflicting update to the scrollbar while the focus to the box was true. I made a change to your VI, which looks for a change in the command coming from the mouse input and AND-ed that with the focus. I think this is what you were looking for. Also made some minor changes to get rid of coercion dots and added a wait timer because the VI was eating up all the CPU usage.
Message 4 of 6
(3,786 Views)
Thanks for the modifications, it was exactly what I was looking for.  Just one thing i was wondering about was why did you replace the 'divide' by a 'Quotient & Remainder'.  Using your vi the flickering stopped but scrolling upward caused a problem where by scrolling up to much the scroll bar went back to the bottom.  I replaced your 'Quotient & Remainder'  as well as the conversion to unsigned long integer back with the 'divide' operator and it worked fine.  I was wondering if there was any particular reason you did not use the 'divide' operator.
 
Other than that the vi is working fine , thanks
0 Kudos
Message 5 of 6
(3,759 Views)
Ah... When you scroll all the way to the top and keep trying to scroll, the value going into Text.ScrollPos is negative, but since I converted to U32, the U32 overflows and scrolls you all the way to the bottom. You could keep things in I32 and check for the negative condition, then overwrite with 0, and finally convert back to U32. Or if you really want to use DBLs, pop in the corresponding numeric conversion VIs.
0 Kudos
Message 6 of 6
(3,742 Views)