Skip to content

Resizing of Arrays causes several problems #6

@jgr1969

Description

@jgr1969

The resizing of arrays causes some funny issues and errors. Cause of these problems is that the Refnum of the array element will point to the last element in the array that the user clicked or changed.

Try the following things with the VI (LabVIEW 2015) included in the zip-File attached.

Array Issue.zip

Start the VI and e.g. maximize the window size -> OK
Set back to original size -> OK
Change the value 10 in the leftmost array (ArrayElement Refnum will now point to that specific numeric)
Maximize VI window size -> Top position of "Array" is not aligned anymore with the other element -> FAIL
Set back to original size, click element 1 of "Array".

This error is even worse if the array element is a cluster that is not set to "autosizing". This is demonstrated with "Array 2", just click on the last element of that array and than resize the frontpanel -> major fail, because the position of the "wrong" cluster elements (in comparision to the elements of the xml-file) gets changed and suddenly all cluster elements are "invisible".

Clicking on the first visible element of "Array 2" at least recovers the position of the cluster elements after the next resizing.

Work-arounds:
Activating "AutoSize" on the cluster at least resolves the issue that the cluster elements are "invisible". But after that, the array itself can get repositioned.
That problem can be resolved by changing the code of the VI "NI_SE_Front Panel Layout.lvlib:Array Control Layout.lvclass:ApplyLayoutToObject.vi". - see attached image:

image01

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions