12-14-2009 06:58 AM
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.
Solved! Go to Solution.
12-14-2009 07:13 AM
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.
12-14-2009 07:25 AM
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
12-14-2009 07:42 AM
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.
12-14-2009 08:02 AM
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
12-14-2009 08:24 AM
Errata:
There is a possible way to change the size of the elements; see this KB for this request.
hope this helps,
Norbefrt
12-14-2009 09:23 AM
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?
12-14-2009 09:27 AM
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
12-14-2009 09:29 AM
Hi Norbert,
That's it!
A lot of thanks!
12-14-2009 09:32 AM
Norbert B wrote:Which one is the image you cannot see?
The one that I cannot see.
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.