LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create a button like the one pictured here

Solved!
Go to solution

How would I create a button like the print button below?

 

 

I was thinking actually make it two separate buttons placed next to each other. The print button obviously would just be a modified boolean, that's easy. But the drop down is a bit harder. I figure I could customize a drop down but because I haven't been able to play around with it in LabVIEW (don't have it at home) I'm not sure if you can modify the alignment of the box that actually drops down etc. Is the drop down box location and look something you can modify within the control editor?

 

I'm guessing I could also use .net correct? But I am trying to keep it all with just control modification in LabVIEW if possible. Thanks.

 

 

Message 1 of 8
(3,575 Views)

The obvious control for the drop down would be a listbox which should allow you to have custom icons for each line. Obviously, you can use some simple position and size properties to place the listbox exactly where you want it. You may wish to place it in a tab or have it as another VI. Another option might be turning the whole thing into an XControl, but then you should make sure you can dynamically resize the XControl, so it displays the whole list. Also, remember that XControls can't outgrow the bounds of their container.


___________________
Try to take over the world!
Message 2 of 8
(3,530 Views)

In 'the good old days' when you didn't have a native 'right click menu', you could write a vi to get that functionality. Search the forums (LAVA as well) for some code using 'drop-down menu' or 'pop-up menu'. There should be at least two implementations in LV 7 or 6. It requires some code to resize the FP of the vi depending on the entries in the list/ the size of the control.

Then uncheck all the options like window has a title bar etc.

In addition you need some code that places the vi's FP at the right place.

 

Felix

Message 3 of 8
(3,497 Views)

Would a Run Time Menu not work?  Right click on an item and a pop-up is displayed.  It sort of looks like the one shown.  Search for examples.

- tbob

Inventor of the WORM Global
Message 4 of 8
(3,455 Views)
Solution
Accepted by GregFreeman

for(imstuck),

 

I'd use a multicolumn listbox and toggle it's visibility when the user clicks on the button.  I've attached an example:

 

 

~Simon

Message 5 of 8
(3,417 Views)

http://decibel.ni.com/content/groups/ui

 

simon to the rescue

---------------------------------
[will work for kudos]
0 Kudos
Message 6 of 8
(3,393 Views)

all these are good, and possible solutions so I'm not going to mark any as solution, but I like Simon's idea!

0 Kudos
Message 7 of 8
(3,367 Views)

Whatever works for you (or you like most), mark it as the solution.

It makes this thread 'solved' and anyone who has the same issue might quickly jump to a good concept.

 

Felix

0 Kudos
Message 8 of 8
(3,359 Views)