09-11-2013 05:24 AM
Hallo,
I'd like to have a numeric control for the user that allows him to change the size of a control array (of clusters). Is that even possible?
Not control just the displayed as in "Number of Columns", but deactivate the clusters that have N higher than # on the numeric control.
Thanks,
Solved! Go to Solution.
09-11-2013 05:37 AM
09-12-2013 03:15 AM
It works for the programm, but the user do not see those deactivated cells as deactivated. I would need something that shows that to the user.
09-12-2013 03:18 AM
Hi spinelli,
when you limit the array size as described above (and refresh the control with the size-limited array, of course) the user will see the deactivated elements.
Btw. I would call such an approach a "bad user interface".
Why not limit the possible user inputs so (s)he can only access allowed array elements?
Why use an array control at all in the UI?
09-12-2013 03:27 AM
It seems that it will work. But how do I refresh the control array?
And I need the array size to be defined by the user. The number of elements represents the number of robots on the line, and the information inside the array are the proprierties of each robot.
09-12-2013 03:31 AM - edited 09-12-2013 03:32 AM
Hi,
I'm not sure if the vi of re-initialing array size is what you want?
btw, who can tell me why I cannot upload the *.vi file?
09-12-2013 03:33 AM - edited 09-12-2013 03:34 AM
Hi spinelli,
- "refresh" means: writing the current data into a local variable of the control.
- The user may still define the array size. But: you can make a UI, where he only has access to one array element to change the parameters. The user has to select which element to process - and that selection can easily be monitored to allow only valid elements. See this as an example:
On the left side you see a table that shows all possible elements (here just one). You can select an item to edit it's properties on the right side of the UI...
@Will: this is an old problem...
09-12-2013 03:58 AM - edited 09-12-2013 03:59 AM
Will, it worked, thanks a lot. That was exactly want I needed. The only problem left is that when I change the value in "Numeric" it resets all the values in the array to initial. Can I store the data in the array to avoid the problem?
09-12-2013 04:03 AM
Gerd, thanks for "refresh" explanation, I didn't know it was possible! But I still don't get it with the image you've sent. Where do you go to this configurations? Can you send me the VI or the problem with uploads is for everyone?
09-12-2013 04:06 AM
Hi spinelli,
the shown frontpanel is of a VI made for our testbench software. I can't send you the VI for several reasons (copyright, heavy linkage to my user.lib, ...).
It's just an example to show you a way, how to present an array of settings to the user - without showing the underlying array itself...