LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ring control with Tree view dropdown

Is there a programming language that allows dropdown structured with collapsable sections to avoid this kind of very long list? How would we call this kind of control?

 

Is there a way to do this in LabVIEW?

 

So a control that shows the selected item only, when we click the arrow button it would show the tree control to let user select his value.

 

2015-07-23 17_15_41-Untitled 2 Front Panel on ABT.lvproj_My Computer rev. 0 _.png

0 Kudos
Message 1 of 3
(3,626 Views)

I'm not aware of any, but I don't see any reason in principle why it couldn't be done.

 

The simplest solution to this is to use a combo box, which gives you the ability to type and does auto-complete.

 

A more involved one is this (comes from this idea), which allows you to filter the list by typing.

 

You could do a tree in an XControl, but the major problems with XControls is that:

 

  1. They need to be contained inside the control owning them. This is actually slightly irrelevant, because if you look at these drop-downs, they actually tend to be separate windows, which aren't even constrained by the window which calls them (also seen in your example). That means the best option might be for the XControl to run another VI to serve as the tree. Which brings us to #2:
  2. There is no "focus lost" event for controls or windows, so there's a problem with deciding when to dismiss the dialog. The easiest solution is to make it modal. Another one might be to try to register for window messages or to do something like polling the Is Frontmost? property of the VI.

___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(3,527 Views)

Umm, looking now I can see that there is a VI deactivation event in recent versions (and now I seem to remember that I did actually know about it), so I wanted to test it (also for other potential XControls with popups). How's this as a start (2013, should hopefully work)? The example builds a tree of folders, so you need to give it a top level path before running it. I didn't bother with any cleanup or setting up the sizes properly.


___________________
Try to take over the world!
0 Kudos
Message 3 of 3
(3,465 Views)