LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Drop-down list of check-box options with header.

Solved!
Go to solution

Okay, I'm not sure if this is actually possible but I shall ask anyway. Partially because I have limited FP real estate and also because I think this is relatively easy method for the user to use, I have come up with the following idea:

 

I want something that looks similar to a menu ring when not selected, displaying the text 'Plots'. Then, when it is clicked a list/menu opens downwards (as opposed to the default operation of menu rings). In this list/menu will be an element for each plot that is displayed on an XY Graph. Each element will contain a check-box (control) and a string (indicator). The strings will each display their respective plot name. The user can then click on the list/menu/thing to show the elements for the plots, and can check or uncheck however many they wish. The idea is that whichever plots are checked will be the ones displayed on the XY Graph.

 

Firstly, have I explained this well enough, and secondly, is it possible?

 

Thank you.

 

James

 

 



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 1 of 22
(8,361 Views)
Solution
Accepted by topic author J.Mamakos

Similar to the Thread Options menu in these forums (look up and the left), when the mouse is hovered over/clicked on it a menu appears below with string fields. You could create something like this with checkboxes also. To do this (and this may not be the best way but just my first thought Smiley Very Happy ) you could have a modal borderless subvi appear positioned over the control that has the controls and string indicators within it that you need. It would appear when you click on your "Plots" control (which could be a simple string indicator). It would disappear if the user moved their mouse out of the subvi's window bounds for more than a few seconds (as with the Thread Options menu above).

 

The subvi would have to resize itself to suit the number of XY graph curve details it needs to display, but this isn't too difficult.

 

There may some drawbacks to this that I haven't thought of yet though... Smiley Happy

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 2 of 22
(8,354 Views)

Thank you for this suggestion. A couple of questions though...

 

How would I ensure that the SubVI is always 'aligned' with the control on the main FP?

 

Also, how would I make it disappear  when the mouse is not over it?

 

And how do I make a VI borderless?



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 3 of 22
(8,346 Views)

You need to get the position of the control via property nodes and you can set the position of the SubVi Front Panel acordingly.

You can use the FP.Open=False property to close the SubVI.

To make it borderless you need to uncheck all kinds of properties in the VI properties (like window has titel bar).

 

I once created pop-up menues this way, so it is possible. 

 

Felix 

Message 4 of 22
(8,344 Views)
How would I create an 'event' when the mouse is outside the SubVI's window area for a set period of time?


Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 5 of 22
(8,328 Views)

Just to make sure I wasn't leading you down the garden path, I messed around a little and came up with the following two vi's (LV 8.5)

 

Load  Custom Ring Main.vi, run it, and try selecting the ring list.

 

Hope this helps! Smiley Very Happy

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Download All
Message 6 of 22
(8,318 Views)

Thank you. With a couple of tweaks here and there, it'll be working just as I'd hoped. 🙂

 

I have one problem though. How can I simulate 'Mouse Leave' and 'Mouse Enter' events in LabVIEW 6.1?  If it's not possible, I may have to settle with a normal pop-up window.



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 7 of 22
(8,289 Views)

Would I be going down the right path if I used the 'Coords' data field of the 'Mouse Move' event to check if the cursor is still within the boundaries of the FP?

 

The coords returned in this case are relative to the FP origin. However, when finding the 'FP.PanelBounds' property of the VI, the coords returned are in global screen coordinates, that is, the numbers refer to coordinates within a computer monitor's screen rather than in relation to the FP origin.

 

Does anyone know how I can translate one from the other and visi versa?



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 8 of 22
(8,281 Views)

Does anyone know how I can translate one from the other and visi versa?


If you check my code, you'll see how I convert the control panel-wise coordinates to screen-wise coordinates for positioning the subvi window.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 9 of 22
(8,262 Views)

Okay, yes - I asked the question too quickly. I'll look more carefully next time!

 

This is more a general question now... Some 'Event Structure' events have a 'CtrRef' data field. If I use this reference in following code, do I then need to close it like I would every other reference? Then if I don't use it, do I still need to close it or is that done automatically? Following on from that, if that particular data field is not even shown/selected, will I be loosing memory even then by not closing the reference? At what point might I end up loosing memory if I leave it unclosed? When is the reference actually 'opened' for use?



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 10 of 22
(8,254 Views)