09-22-2017 07:34 AM
How do I make the Boolean buttons act like a radio button in this Cluster array.
If the user clicks on one of the buttons I want all other buttons to be false.
Is this the right control to use of is there something better.
I am trying to make a list of tests and the user will click on the Boolean to run the desired test.
09-22-2017 07:43 AM - edited 09-22-2017 07:45 AM
it is not good idea to use array of cluster just to select tests to be run. I am not saying it is impossible but first it will not look good and you will need to manage update/create array each time user select different test.
how about using table or list, with proper marking(tick and uptick) ?
09-22-2017 08:27 AM
I cannot open your code to see what you have done but all you need to do is place down a radio button group, right click each control inside it and replace with the type of boolean you want to use. No code necessary.
09-22-2017 08:33 AM
Radio buttons are static always the same number of tests.
This is not what I want I want the user to be able to define how many tests they need.
Thus use an array.
09-22-2017 09:13 AM
The easy answer: Use a radio button.
What you're probably after: Use a Value change event on the array and set all but the current button to false.
/Y
09-22-2017 12:15 PM
09-22-2017 04:10 PM - edited 09-22-2017 04:13 PM
@rcard53762 wrote:
How do I make the Boolean buttons act like a radio button in this Cluster array.
If the user clicks on one of the buttons I want all other buttons to be false.
Is this the right control to use of is there something better.
I am trying to make a list of tests and the user will click on the Boolean to run the desired test.
Unless you have additional cluster elements, a plain Boolean array is all you need. I guess you have other cluster elements, such as a string to give the test a name, for example.
Is the number of tests known from the beginning or can the number of available test change during the run?
Personally, I would use a simple listbox (selection mode = 1 item), filled with the various tests. You can sense e.g. double-clicking an entry to run that test.
04-02-2018 08:28 AM
This example you gave me works great. 1 more question. How can I make the event structure ignore anything but the Boolean (test button). See attached file.
Thanks
04-02-2018 09:16 AM - edited 04-02-2018 09:16 AM
@RickDTS wrote:
How can I make the event structure ignore anything but the Boolean (test button).
Unfortunately, you cannot do that with an array of clusters.
As an aside, you can greatly simplify that while loop in your event case by using a FOR loop.