From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-05-2019 07:33 AM
Hi!
I have been trying to do a part of the project I am working on for two weeks. This part consist on the following.
My program reads an excel and save the measurements it contains into many arrays, until that it works. But, I need to include these arrays into comboboxes, rings or whatever allow me to choose a value of these arrays inside a data container.
I can't use an array because as you know, comboboxes in arrays always have the sames values and I can't use a cluster because depending on the excel you read there are more or less measures and can't add elements to a cluster dinamically.
I add an screenshot of the frontend I would like to get. I know I can't do it like that but it is just to represent the ideal work of what I need.
THANK YOU!
08-05-2019 07:45 AM
Hi Kanayel,
in an array all elements share the same properties: so your rings have to have the same items.
In a cluster each element can have different properties, so this would be one way to go.
In a cluster the number of elements is fixed: as you need a variable amount of elements you would have to "fake" it by adding an additional selector so the user can switch between several "sets" of rings. Would work, but doesn't provide a nice UI and UX.
My suggestion: show the list of options in a (multicolumn) listbox. Here the user can select the item (s)he want to change. For each selected item you can provide an inputs next to the listbox.
Similar to this:
Listbox on the left, controls (on the right side) to change the entries…
08-05-2019 07:50 AM
If you can guess what's the maximum number of arrays, you can actually use a Cluster containing the maximum number of Combo Boxes.
Define the Cluster AutoSize property as anything else than None and hide/show the proper number of Combo Boxes, via the Cluster Controls[] property. The Cluster area will be resized properly.
08-05-2019 09:57 AM
An example of what I suggested.
08-05-2019 10:58 AM
In addition to other described techniques, one can also use "filter" events such as "Mouse Down?" to set the elements in a combo box or ring, based on which array element is clicked on. This can simulate an array of combo boxes with different selection choices.
08-06-2019 01:25 AM
@drjdpowell ha scritto:
In addition to other described techniques, one can also use "filter" events such as "Mouse Down?" to set the elements in a combo box or ring, based on which array element is clicked on. This can simulate an array of combo boxes with different selection choices.
This would not work, as selected items in all other combo boxes would change. You would never see in a single view what you selected.
08-06-2019 02:30 AM
Are you talking about combo boxes or rings? What you say is true of rings.
08-06-2019 02:37 AM
You are right, I was probably thinking more about rings.
If the combo box is set to Allow Undefined Strings (which is the default anyway), it can retain its value irrespectively of the Strings[] property.
08-06-2019 06:18 AM
You can also make a drop down context menu. If the user presses something (mouse down? event) set it to right click. That will trigger the context menu. Catching the menu activation event will allow you to make your own menu.
See attachment for a quick and dirty mock up.
08-06-2019 12:11 PM
Just to put in my two cents:
I had a similar problem before and solved it with a moving ring as drop-down list. See attached VI.
It creates a list of names and a length-variable list of attached names. These are selectable and changeable for every name- entry.