From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
When a 1 Dimensional array of any type is showing only a single element, LabVIEW forces a horizontal scrollbar. I couldn't find any documentation or reasoning behind it. It's really annoying and ruins UI design that Vertical is the normal scrolling direction for just about everything else ever and LV messes that up for some seemingly arbitrary reason.
Currently, arrays with 1 visible element can only have a horizontal scrollbar.
This makes no sense, especially when you have an array of large clusters. They take up a lot of space so i commonly show only one at a time, and a vertical scrollbar is the more natural choice.
I spoke with a coworker and we realized that the purpose to the default being horizontal is probably to indicate that 1D arrays build up as "rows" by default.
Strictly speaking, when you create an array and do not expand the array to show more than one element, no scrollbar is shown.
However, you are correct that the only option available is to show a horizontal scrollbar:
If you expand the array vertically to show at least 2 elements, this option is changed:
Showing the vertical scrollbar and then resizing the array to a single element... changes the scrollbar to an horizontal one!
I am glad to hear that you have convinced yourself that this bizarre and unjustified choice is "natural", but it is really just an arbitrary decision from NI. Which makes it an "expected" behavior if not a "desired" or "documented" one.
Try this on a single element array and find a justification for the result:
A UI design that has array containers showing a single element AND a scrollbar seems not very good. Can you show us an example where this would even be useful? Are you dynamically resizing the array container in some way? You could programmatically turn off the scrollbar if the height is only 1 at the same time.
Arrays with one element are typically much wider than high and it is thus much easier to fit a horizontal scrollbar. A vertical scrollbar that is only a dozen pixels high would be completely unusable anyway.
The key concept in the OP is "array of any type". If the type is a large cluster that happens to be taller than it is wide, a vertical scrollbar makes sense. Even with a single element shown. My illustration with a numeric was maybe obfuscating this detail, but that's because I focused on the underlying logic and inconsistencies.
As you might have noticed from all my posts and ideas, I am not a big fan of artificial limitations, and this is one. 😄
The only thing that needs to change is that if only a single element of a 1D array is shown (and no scrollbar is currently visible) both scrollbar options (horizontal and vertical) should be available. Graying one of the options should only happen once more than on element is shown (defining the direction) or if a scrollbar is already present (also defining the direction).
With this in mind, I am kudoing this idea, even though the original post reads more as a complaint than a constructive idea. I hope the curators will read my comment.
Actually, there is contradiction in terms in your recommendations.
If you suggest that an object with a single element shown AND a scrollbar shown should have the other direction grayed out, I'd say this is artificially limiting the programmer's freedom.
If a single element is shown, the programmer should be allowed to interchangeably choose one or the other direction (or none). Which is essentially the OP's contention.
Moved to CAR database: CAR 734067