Jump to content

Embedded image in ring control (VIPM)


Callahan

Recommended Posts

Hello everybody,

I have a simple question about the VIPM GUI :

How is made the LabVIEW version ring selector (see png file) ?

It has a image inside it, but it is clickable...I try a lot of ways to do that...customize system rings...but I don't succeed...

Anyone as THE solution?

(I supposed that the solution is simple, but sometimes it's hard to do simple...).

Best regards,

Callahan

Link to comment

Without looking at VIPM itself, I'm guessing this is simply a ring with a picture overlayed on top of it and changed whenever the ring's value is changed. If the image itself isn't clickable (which I don't remember offhand), then this is very easy to accomplish.

Link to comment

QUOTE (Yair @ Jan 26 2009, 06:29 PM)

Without looking at VIPM itself, I'm guessing this is simply a ring with a picture overlayed on top of it and changed whenever the ring's value is changed. If the image itself isn't clickable (which I don't remember offhand), then this is very easy to accomplish.

...The image is clickable...

Link to comment

OK, so now I did look at VIPM itself and here's my current guess:

What you actually have there is an image of the ring (or an actual ring, more likely) with the images on top of it. On top of that image is a transparent ring which is what you actually click. You can see evidence of this in that the ring does not highlight when you mouse over it (which can actually be changed by using the mouse enter event for the transparent ring). You can also check if this is so by changing the OS theme, but this can also be worked around by building the ring image dynamically by placing a system ring off screen no need for this if you simply use a ring and place the images on top of it.

Incidentally, the filter ring (to the right of the version ring) does seem to have the image overlayed on top of the ring (it's not clickable and the ring highlights when you move off it).

Link to comment

QUOTE (Callahan @ Jan 26 2009, 09:38 AM)

...The image is clickable...

So is the pict ring. But I see the drop-down is not as attractive as the VIPM version. Like Yair mentioned, they also have to do some trickery to only drop down a subset of the images in the control. Pretty slick. But you only asked about a clickable picture, and the pict ring should be enough. Are you using the operate tool to click it?

Link to comment

OK, so I figured "why not?". Here's a quick example (8.0). The tricky bit is using the Text.Visible property to hide the text of the transparent ring. In the example I used the picture control, but I assume that in VIPM a transparent PNG is what's actually used.

Link to comment

VIPM is closed source, so I don't have access to its source code. I originally didn't look at the program at all, which is why I didn't know if the image was clickable or not.

Incidentally, after actually thinking about it, I'm guessing that VIPM actually uses a transparent PNG and loads it into a picture control using either a mask or code that does full alpha transparency.

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.