03-26-2009 04:01 PM - edited 03-26-2009 04:03 PM
I've got a control that is an array of enums. I'm only showing one element. Labview will let me display a horizontal scrollbar. I need the scrollbar to be verticle to match other controls and indicators on the front panel. Labview seems hard coded to prevent me from displaying a verticle scrollbar on an array with only one element showing. frustrating.
Now they're just messing with me. I knew it!
-root
Solved! Go to Solution.
03-26-2009 04:38 PM
I think you have found some sort of bug with the array control.
You have 1 element of a 1-D array showing, So there really is no vertical or horizontal scrollbar to show. Even though it lets you select a horizontal scroll bar, that setting doesn't actually seem to stick. Bad.
If you stretch the array to the right to have 2 or more elements showing, then you can have a horizontal scrollbar and it shows. Good
If you take the array back to a 1 element, then stretch it down, you can select a vertical scroll bar and the horizontal becomes unselectable. OK.
If you have the vertical showing and take it back to a 1 element view, then the vertical becomes horizontal. Good. And it works, also Good.
If you go into the properties and try to uncheck show horizontal, you see the setting doesn't stick and the scrollbar remains. Bad. But the scrollbar still works. Good.
Results:
With a 1-D array, you can only have a horizontal or vertical scrollbar.
If only 1 element is showing, LabVIEW only allows a horizontal orientation.
If only 1 element is showing, the properties dialog doesn't seem to work properly to allow you to check or uncheck the horizontal scrollbar. I vote BUG on this.
I am attaching a simple VI in LV8.6 that you and others can play with for resizing the array and working with the properties dialog.
03-26-2009 05:04 PM
Confirmed the same thing in LabVIEW 8.5.1. Even the property node for verticle scrollbar with one element showing doesn't work.
03-26-2009 07:33 PM
03-27-2009 10:21 AM
Yes, that does work, but I have a rather complex pop-up control dialogue that is a long vertical array of clusters that contain arrays of enums (among other things). Some of the arrays of enums will always contain multiple elements, but some of them will almost always contain only one element, occasionally containing two or more. I need to use a vertical arrangement for the multi element enum arrays because of the screen layout. I'm trying to reduce some of them to just one element to save screen size on my pop up window. In order to reduce some of the enum arrays to one element, I have to accept a horizontal scrollbar will looks quite stupid next to all the arrays that are stuck with vertical scrollbars. So, I'm now stuck with forcing evey array of enums to two elements which takes up too much space.
-root
03-27-2009 10:54 AM - edited 03-27-2009 10:59 AM
I think there is a bug in the way the dialog box handles the selection/deselection of scroll bars that an NI person you join in on this conversation and submit to have a CAR# assigned.
I think not being able to have a vertical scrollbar on a 1-D array that is only sized to 1 element might not be considered a bug, but a design decision by the LV programmers. Perhaps because a vertical scrollbar on normal sized controls such as numerics and strings would be too small to be usable. But for taller arrays such as a cluster, why not? I would even say that a scrollbar is more intuitive when there is room for it. Generally you would think of the elements of 1-D arrays as being rows, so a vertical scrollbar would allow you to roll the rows up or down.
Being able to use a vertical scrollbar should either be added to the bug report/CAR # for the dialog box problem, or perhaps you should submit it to the product suggestion center as well.
A possible work around would be to not use the array scrollbar, but drop your own vertical scrollbar onto the FP and use property nodes to set a range, and the value of that slider to adjust the shown array index using its property node. An event structure should probably be used as well to handle a value change event on the scrollbar.
03-27-2009 11:09 AM - edited 03-27-2009 11:09 AM
You're right- a custom control will have to do. I was wondering the same thing about whether it was an intentional design decision, ignoring the obvious weird behavior that you previously mentioned. But alas, it cannot be. One may size an array element to be very thin in the horizontal direction, and the horizontal scrollbar (useless as it may be at this size) still shows. The tiny horizontal scrollbar is no wider than a single default sized enum or string element is tall, so we conclude that this behavior is not intentional (or at the least, inexplicable.) See the picture below-
-root
07-16-2009 08:41 AM
12-17-2013 01:58 PM
Still around in LV 2013...
10-13-2014 05:06 AM
Still there in LV 2014f1