LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

force verticle array scrollbar

Solved!
Go to solution

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

Message Edited by Root Canal on 03-26-2009 04:02 PM
Message Edited by Root Canal on 03-26-2009 04:03 PM

global variables make robots angry


Message 1 of 13
(11,262 Views)

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.

Message 2 of 13
(11,250 Views)

Confirmed the same thing in LabVIEW 8.5.1. Even the property node for verticle scrollbar with one element showing doesn't work.

Now Using LabVIEW 2019SP1 and TestStand 2019
Message 3 of 13
(11,241 Views)
I believe you need to expand the array to display at least two elements before the vertical scrollbar will be enable-able.
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 4 of 13
(11,222 Views)

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

global variables make robots angry


0 Kudos
Message 5 of 13
(11,198 Views)
Solution
Accepted by topic author Root_Canal

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.

Message Edited by Ravens Fan on 03-27-2009 11:59 AM
Message 6 of 13
(11,190 Views)

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

Message Edited by Root Canal on 03-27-2009 11:09 AM

global variables make robots angry


0 Kudos
Message 7 of 13
(11,183 Views)
Inexplicable indeed, NI really should fix it
0 Kudos
Message 8 of 13
(10,969 Views)

Still around in LV 2013...

0 Kudos
Message 9 of 13
(9,158 Views)

Still there in LV 2014f1

 

 

 

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
0 Kudos
Message 10 of 13
(8,469 Views)