LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove empty items from menu ring

Hi
 
I would like to know if it is possible to remove empty items from menu ring. My problem is that the number of strings that goes in the menu ring is not constant.
 
For example, if the user choose TC02 in the first menu ring, then the second one will display all the TC02-XXX. Let suppose that there is 50 TC02-XXX.
After that if the user choose TC03 in the first menu ring, and there is only 4 TC03-XXX, then the second menu ring will display the 4 TC03-XXX with 46 other blank choices.
 
I would like to remove those blank choices. I don't know if any of you have an idea.
 
 
Thanks
 
Julien Tozzi
0 Kudos
Message 1 of 7
(3,483 Views)
If you write to the Strings[] property of the second ring, with an array of strings of the items to go in the list, you will not see this behaviour.

Let us know if this is what you need.
0 Kudos
Message 2 of 7
(3,480 Views)
Actually, it is what I'm doing...
 
I don't know if you can look at it...
 
Thanks for your help
0 Kudos
Message 3 of 7
(3,476 Views)
Ahh, okay, now I see your problem.

There are likely better ways of doing this, but the attached vi will serve your purposes.
Message 4 of 7
(3,468 Views)

Thanks, that's exactly what I was looking for.

And for my information, how would you do this?

0 Kudos
Message 5 of 7
(3,464 Views)
I would do it the way I did it in the vi I attached.

I was thinking along the lines of someone more experienced in efficiency and code optimisation.  Unless I have to for some reason, I try not to waste too much time on that (not to say I don't follow the style guidelines etc.).

The reason I said "there are likely better ways of doing this" is because there are so many ways of doing things in LV that some methods are more efficient than others, and this is likely not the BEST solution, but it works.
0 Kudos
Message 6 of 7
(3,462 Views)
Ok, thanks for your help
0 Kudos
Message 7 of 7
(3,458 Views)