12-11-2023 01:36 AM
I have unsigned integer as control and this value can range from 0- N. I have an 1D array of combo box with N elements. Now according to the input given by the user i.e. in the control the elements in the array should get enabled or disabled.
Like for example if the user gave the value 5 in input than first five elements of the array should be enabled and rest all disabled how do I achieve this?
I tried using property nodes but it did not help!
12-11-2023 01:54 AM - edited 12-11-2023 01:55 AM
Hi Aliza,
simple rule: in an array all elements share the same properties!
You cannot disable/enable individual array elements...
You could hide the array index control and you could set the number of visible array elements instead. Or you can design a more user friendly UI...
12-11-2023 01:56 AM
You can't. All elements in an array have the same properties. You may simply use N separate combo boxes, showing the number of controls you need and hiding the others (make an array from their references to do this in a compact form). If you want to keep the controls bound together, you may group them in a cluster. In this case, the references array is the Controls[] property of the cluster.
12-11-2023 04:14 PM
Is the array of combo boxes itself a control or indicator?
You can hide the array index and scrollbar and set the container size to show the desired number of elements. Still pretty pointless because you need space for the max number of elements anyway.
Can you give some background what you are trying to do with all this? Maybe there is a better solution.
12-11-2023 07:59 PM
You could trap the "Mouse Down?" event on the array, then optionally discard the event depending on the index.
Use the attached VI to get the index from the coordinates.
12-12-2023 01:18 AM
Thank you everybody for helping! Really means a lot!
I got the solution when i pushed my brain a little that also without using property node and also not compromising on GUI.
12-12-2023 01:30 AM
Hi Aliza,
@Aliza24102002 wrote:
I got the solution
I don't think so…
12-12-2023 03:17 AM
The functionality that I needed is getting fulfilled.
12-12-2023 06:04 AM
@Aliza24102002 wrote:
The functionality that I needed is getting fulfilled.
The fact that you don't care about the quality of your block diagram makes you a hack.
12-12-2023 06:13 AM
ok I am sorry I got the point I will try to improve and keep that in mind