LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control array's scrollbar shows more rows than dimensions

When an array's dimension and Number of Rows property are set to the same value, its vertical scrollbar is shown and implies there is one more row available in the array than the actual array size.
This happen only if the array is a control, not when it is an indicator.  As an indicator, no scrollbar is shown at run time.  In edit mode, a scrollbar is shown when as an indicator.
 
Is there a way to not have the scollbar appear if the number of rows equals the array size yet have it appear when the number of rows is less than the array size ?
 
Example vi attached.
0 Kudos
Message 1 of 4
(2,968 Views)

Hi SteveP,

There is an array property called Vertical Scrollbar Visible.  You could compare the array size to the number of rows and then use a case structure to set the visibility of the scrollbar.  I modified your code to do this, although some of the logic is unnecessary since the number of rows and array size will always be equal due to the way the array is being created. 

Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(2,942 Views)
Jennifer,
 
In practice, the number of displayed array rows is restricted so that only enough rows are shown to remain within the bounds of the front panel.  Otherwise as the array size is increased, the array will extend off the bottom of the screen.  My modified version shows this restriction.  But notice that as a control, the array shows one more dimension than it had been allocated to (and is shown as a disabled row).   In fact, clicking on the bottom arrow of the scollbar will continue to add more rows to the array control.
 
Steve
0 Kudos
Message 3 of 4
(2,929 Views)
I believe that this is intentional so that you CAN add elements to the array control.  I have a CAR 3ZP95454 that suggests that we should at least optionally change this behavior so that the bottom element is the last allocated element.  We are reviewing it for a future release of LabVIEW.
 
I don't know of any workaround currently.
 
Jeff Peters
 
0 Kudos
Message 4 of 4
(2,914 Views)