04-04-2011 07:22 AM
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:
(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
04-04-2011 07:52 AM
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
04-04-2011 08:06 AM
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.
04-04-2011 10:15 AM
Do you need something like this?
04-04-2011 11:04 AM
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
04-04-2011 11:42 AM
And here's one based on a guage.
04-04-2011 11:54 AM
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.
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.
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.
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
04-05-2011 02:05 AM
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