LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Menu ring with dropdown list

Well, I'm trying to get a bit fancy and am mostly getting myself confused. I would like to have on a FP a dropdown list like those which you usually find in Windows, i.e., the tabs at the top where the choices appear directly below the tab. The only thing here is that I want it on the FP, not in a tab.

 

I can do a standard listbox control (use Compound_List.ctl attached below on a blank FP), but the list of choices that appear is positioned that the current choice is lined up over the user-entry box so the list jumps up or down, depending on the last choice.

 

What I would like to do is make it look like the control(s) in Menu_demo2-vi (also attached below, change hyphen to period for LV), slightly modified from the one in this thread (https://forums.ni.com/t5/LabVIEW/What-is-the-best-way-to-implement-a-menu-ring/m-p/589763/highlight/... - link function won't work), where a listbox always occurs directly below a ring control, then vanishes once a choice is made.

 

Is there any way to include this subVI into a strict typedef or some other simple structure so that it doesn't get my BD real messy? (I also need to be able to add or subtract items from the list in a separate part of my program, but once I figure out just how to put it up here, I should be able to do that) Or could this be a case where a while loop could be inside another while loop, since it's event-driven and is configured to stop once a selection is made?

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
Download All
0 Kudos
Message 1 of 7
(2,581 Views)

You should turn this into an XControl which already uses an event structure to handle the interface elements.

After you got it working properly you could also add a new property node to add/ remove elements from the list (which would apply to both the disabled ring and list box).

I have in the past tried to create a working XControl but I always seem to fail...

Perhaps you might have better luck 😃

0 Kudos
Message 2 of 7
(2,571 Views)

And I thought I was confused now! OK, I'll give it a try and let you know how it worked (or not) next week. Thanks.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 3 of 7
(2,562 Views)

Sorry, this message is not meant to be there, but i can't find a way to remove it....

Giuliano Franchetto
Student at the l'Ecole Nationale Supérieure des Mines de Saint-Etienne, cycle ISMIN (FRANCE)
0 Kudos
Message 4 of 7
(2,547 Views)

Well, I scratched my head (and pulled a good bit of the remaining hair out) through the weekend and yesterday working with an XControl, and I decided it's just too much to go through for one picky little detail (which no one else would probably notice, anyway), so I abandoned that approach. However, I was able to get most of the functionality by adapting the "Menu_demo2.vi" code from my first post and plopping it down into my code. Yes, it does take up more of the BD than an XControl would, and it'll be a bit more complicated to change both controls (menu ring and listbox) to reflect any additions/subtractions the user wants to make to the master compound list, but that's life (or lack thereof). I think (hope) I'm getting better at events, though.

 

Maybe if (read: when) later I have to return to this application to change it, I'll be able to just run off an XControl without breaking a sweat. Or not. Well, that's the theory, anyway. Thanks for your suggestion, Don.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 5 of 7
(2,499 Views)

You know... sometimes I feel like a real dork Smiley Very Happy

Choose one of the controls (enum/ ring) from the System palette...

Hah!

0 Kudos
Message 6 of 7
(2,489 Views)

AAAAaaaaa!

 

C.

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 7 of 7
(2,482 Views)