08-09-2018 08:51 AM
Hi
I've an array control with some number of elements. When I scroll on array control, the vertical scroll bar keep on going and displaying the empty elements in the array. Is there any property available through which I can control the movement of scroll bar?
Attached image for reference.
Thanks in advance!
Solved! Go to Solution.
08-09-2018 09:14 AM
I suspect you will need to use a "Mouse scroll" event.
Inside the event you can get the control reference then use some property nodes from there.
You could take the array size and subtract the NumRows to get the highest allowable top index.
If the index you have attempted to scroll to is greater than the highest allowable, set it back to the highest allowable with another property node.
0xDEAD
08-09-2018 09:15 AM - edited 08-09-2018 09:17 AM
If your LV version supports the Mouse Wheel event, you can hook this event and correct the IndexVals property
08-09-2018 09:26 AM
I Was thinking along same lines.
08-09-2018 10:04 AM
But I was a little bit lazier
08-09-2018 10:06 AM - edited 08-09-2018 10:08 AM
I doubt you can properly catch\intervene that event. You'll always see flickering\artifacts.
I usually end up with a separate scrollbar and array. The separate scrollbar can be programmed with any max value and page length... A bit more work then desirable, but AFAIK the only way to do it right.
08-09-2018 10:33 AM
wiebe@CARYA wrote:
I doubt you can properly catch\intervene that event. You'll always see flickering\artifacts.
I usually end up with a separate scrollbar and array. The separate scrollbar can be programmed with any max value and page length... A bit more work then desirable, but AFAIK the only way to do it right.
Yes its a shame there is no filter event.
08-09-2018 10:53 AM
@deceased wrote:
wiebe@CARYA wrote:
I doubt you can properly catch\intervene that event. You'll always see flickering\artifacts.
I usually end up with a separate scrollbar and array. The separate scrollbar can be programmed with any max value and page length... A bit more work then desirable, but AFAIK the only way to do it right.
Yes its a shame there is no filter event.
How about adding a pop-up ("at end of array stop scrolling!") then set the key focus to someplace else.
Ben
08-10-2018 12:06 AM - edited 08-10-2018 12:09 AM
Thanks everyone.. This solution meets my requirement.
Thanks for your concern for flickering effect but it is not a big deal in my case 🙂
08-10-2018 02:43 AM - edited 08-10-2018 02:44 AM
Interestingly, this doesn't work for array indicators.
When I had a look into the problem it seems that its a bug as discussed here:
https://forums.ni.com/t5/LabVIEW/mouse-scroll-array-indicators-bug-LAVA-x-post/td-p/3730630
Thought I would link it here in case anyone searches this in the future.
0xDEAD