LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resize an array of controls

I have an array of controls. This array can be made larger by simply using the up/down arrows of the array and typing new values in the formerly unused controls.
 
How do I reset the array so that I go from N controls to zero? I have tried using "Delete From Array" but this just returns a new array with elements removed, it doesn't resize the displayed controls in the array.
 
Thanks.
 
Chuck Gantz
0 Kudos
Message 1 of 8
(3,391 Views)
Chuck,
 
Create a property node from you array of contorls and make it "number of columns" or "number of rows".  You can use this to programatically set the size of you array.

Brian

Message Edited by BrianPack on 08-31-2005 03:12 PM

0 Kudos
Message 2 of 8
(3,387 Views)
Just feed a diagram constant of an empty array (of the correct type) to a local variable of your control. 🙂 (see attached, LabVIEW 7.1)

Message Edited by altenbach on 08-31-2005 01:49 PM

0 Kudos
Message 3 of 8
(3,379 Views)


@BrianPack wrote:
Create a property node from you array of contorls and make it "number of columns" or "number of rows".  You can use this to programatically set the size of you array.


Brian, this does NOT change the size of the array, it just determines how many rows and columns are visible on the FP. This is just cosmetic and will not solve the problem.
Message 4 of 8
(3,375 Views)
Yep, your right.  I missed understood the problem I thought thats what he needed.
0 Kudos
Message 5 of 8
(3,368 Views)
Thanks from an LV novice (not a beginner, but I still don't know much). That did it.
 
Chuck
0 Kudos
Message 6 of 8
(3,353 Views)

Altenbach,

He did said: "How do I reset the array so that I go from N controls to zero? I have tried using "Delete From Array" but this just returns a new array with elements removed, it doesn't resize the displayed controls in the array." 

As he said, he already accomplished removing the elements of the array he wanted to resized the array, I think cosmetically. 

I guess we will let him choose which best fits his needs.  Smiley Very Happy


Brian

0 Kudos
Message 7 of 8
(3,352 Views)
The way I read it:
 
It is not possible to resize the size of the array container using the keyboard ("...typing new values in the formerly unused controls.."), but that's how he is increasing "the size".  It must mean that the array container is already set to display multiple elements and he is activating more so they are no longer grey.
 
(...How do I reset the array so that I go from N controls to zero?...)
He wants to reset to zero elements. You cannot have an array showing zero elements. Resizing the container does not change the number of controls, just their potential visibility.
 
--> The meaning of "size" in this context must be the number if real elements vs. the number of greyed elements in the displayed array. 😉
 
0 Kudos
Message 8 of 8
(3,344 Views)