Jump to content

Create special Control


durnek60

Recommended Posts

Hi!

I downloaded a package from Code Repository -> UI Controls -> Lavalib-UI-tools, package. I tried them and i say, wonderful. 

I've been trying to do the follow for a long time, but I need a little help. I wanna design a button, for example : My link, but, I would like to do that, the circle(filled) will be button, without backgorund.

I tried to customize buttons, copy the circle and paste it, but, LV insert a default white background around the circle, and created a rectangle control. How to do that, the white background gone and only the filled circle will be visible ? (the white will be translucent)   

Like in the package!!  Could you help me, I tried so many things... but I don't know how to go on... 

Link to comment

Hi Durnek,

I'm the author of this package. Thanks for your comments.

LabVIEW controls support transparency, but you have to make sure your source image is 32-bit PNG (24 bit RGB image + alpha channel). You can do what you want by hand, which is simplest if you have a small set of controls. First, find a drawing software that supports transparency and can output a png. Some people use PowerPoint, GIMP, PAINT.NET, etc. You can search the LAVA forums for some discussion about this.

Second, use the control editor (customize button) in edit mode. Drag your image on the front panel of your Customization screen. If you see the white background, then you had a problem saving your PNG correctly with alpha channel. If you see it correctly, then all you need is copy - paste on the control using the right click on the image you wish. That's the easy way to get a transparent control.

Check out this nice video by Michael Aivaliotis for a more in-depth comprehension. And here's an example of what you can do with this.

If you're more advanturous, there was a discussion lately on programmatically creating controls. I've done it and will release my work soon (I'm polishing the edges...) but you can have a look at Vugie's BitMan in the code repository for manipulating bitmaps (with transparency). Also, read thisdiscussion for more info.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.