LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom control switch

Hi, I'm a relatively experienced Labview user, but i have never created my own custom controls.

I need to make a 2 pole switch control for a front panel to indicate signal paths.

 

I have done some reading on the ni website about creating or modifying controls, but actually getting the controls editor to give me what i want is driving me crazy.

 

What i need is something like this:

SPDT-Switch.svg

(Would be nice to have a mirror version too)

 

I have been trying to modify the standard boolean toggle switch, but i do not really understand how edit the image parts works. i,e how are the different states handled? an image for each - if so i cant see how that works.

 

also i may have an editor problem, beacuse what ever i do when i copy to clipboard - edit - paste, i get an image with non-transparent background. (i have used both gimp & paint.net)

 

If anyone is a whiz at this and could help me out i would be most grateful.

 

paul

Labview 2010, TestStand 2010
0 Kudos
Message 1 of 8
(5,476 Views)

Check out this search.

 

Tst's post (about the third) should help you.

 

specifically the non-transparent isue is due to the clip-board as implemented in LV does not recognize transparent images. if you read those other threads you will see that import from a "wmf" file should work.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 8
(5,467 Views)

Thanks for the quick reply Ben.

But a few things are still not clear to me. The items whch are "Cosmetic Parts with Multiple Dependent Graphics" from ni's information, have 4 states (True, False & 2 transitions) how to i replace each of these?

 

Also i cannot seem to delete any parts. For example when editing the boolean toggle switch, i do not need the shadow graphic, but i cannot remove it.

Labview 2010, TestStand 2010
0 Kudos
Message 3 of 8
(5,462 Views)

Do you need something like this?

Tim
GHSP
Message 4 of 8
(5,432 Views)

Hi Tim,

 

You are a complete star. I would buy you a beer if I could.

But for my eduaction, i would really like to know how you did that...

 

Cheers, Paul

Labview 2010, TestStand 2010
0 Kudos
Message 5 of 8
(5,420 Views)

And here's one based on a guage.

0 Kudos
Message 6 of 8
(5,410 Views)

OK here is the low down on the custom control.

 

First creat a custom control in LabVIEW and add an OK button. Next you need to click on the wrench symbol on the menu bar to edit the button images.

 

Custom Control.png

 

Next you need to right click on the button and choose the option to import File at same size: Browse and fine the image that you want to import fo rthe up (false) condition.

 

Import Picture.png

 

Next if you right click the button and select the "Picture Item" you will see all of the pictures that you need to replace. They go in the order up, down up click and down click.

 

Change Picture and try again..png

 

Select the next image and redo step two until all pictures for the button are replaced. Should go false state true state false state true state.

 

To test the control click on the tweesers icon and push the button.

 

Save the control and enjoy.

 

I hope this help

Tim
GHSP
Message 7 of 8
(5,404 Views)

For transparency, don't copy and paste. Instead, save the image as a PNG with transparency. You should then be able to use that and it will remain transparent.

 

 

There are also detailed explanation and examples in the UI group - http://decibel.ni.com/content/groups/ui


___________________
Try to take over the world!
0 Kudos
Message 8 of 8
(5,370 Views)