LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to resize array width programmatically?

Solved!
Go to solution

Hi,

 

I have an array with dynamically changed number of columns. Is there a way to fix the whole array width and to change the columns width programmatically? Something like listbox property Active Cell:Cell Size:Width?

 

Thanks in advance.

0 Kudos
Message 1 of 15
(13,618 Views)

No.

 

Try to figure out how many new columns or elements you need to insert, initialize a new 2D array with the additional elements and start by copying the older array into the new one.  Then insert the new elements.

 

Initialize a larger array than needed to avoid having to resize the array too often.

0 Kudos
Message 2 of 15
(13,612 Views)

I assume that you want to "resize" the graphical appearance on the front panel. You can do this by selecting the "Number of Rows" and/or "Number of Columns" and set it to a new value.

I haven't found the width of the array elements in the short time, but possibly someone else finds a solution here.

 

Please note that this resize of course resizes the graphical appearance. So it can happen that you overlay other controls using this method!

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 15
(13,603 Views)

Thanks, guys.

 

This is 1d array with only one row visible. It's used to view and edit rows in a listbox. Number of columns is changed dynamically.

As you can see in the attached images, I changes number of columns in the listbox and in the array and resizes the listbox columns width. I need to do the same resizing for the array too.

 

Download All
0 Kudos
Message 4 of 15
(13,596 Views)

Hm, i have not found a possible way to change the width of elements contained in an array. You can read the width, nothing more.....

Since i assume that you use the array for "header-purposes", why don't you use headers in the table itself?

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 15
(13,571 Views)
Solution
Accepted by topic author Berezka

Errata:

 

There is a possible way to change the size of the elements; see this KB for this request. 

 

hope this helps,

Norbefrt 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 15
(13,560 Views)

Norbert B wrote:

Errata:

 

There is a possible way to change the size of the elements; see this KB for this request. 

 

hope this helps,

Norbefrt 


That KB article has an image that points to ae.natinst.com, which only the people inside NI can see. This has been complained about many times - there are tons of KB articles like this.

 

Also, why in the world is there a BMP image in there? Smiley Surprised

0 Kudos
Message 7 of 15
(13,540 Views)

Which one is the image you cannot see?

And the attached bmp has been converted to png in the text (wondering why the attachement was not updated as well.....)

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 15
(13,535 Views)

Hi Norbert,

 

That's it!

 

A lot of thanks!

0 Kudos
Message 9 of 15
(13,532 Views)

Norbert B wrote:

Which one is the image you cannot see?


The one that I cannot see. Smiley Very Happy

 

Just do a "View Page Source" and you will see an image that has a URL of "ae.natinst.com". Now come and join the rest of the world who will not be able to see that image because we cannot access ae.natinst.com. Like I said, this has been complained about far too many times on these forums, but NI doesn't seem to be inclined to fix these KB articles. 

0 Kudos
Message 10 of 15
(13,528 Views)