Callahan Posted January 26, 2009 Report Share Posted January 26, 2009 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 Quote Link to comment
jdunham Posted January 26, 2009 Report Share Posted January 26, 2009 It's most likely a "Pict Ring". It's on the same palette as the regular ring and enum (but not on the System palette). Quote Link to comment
Jim Kring Posted January 26, 2009 Report Share Posted January 26, 2009 QUOTE (Callahan @ Jan 25 2009, 01:15 PM) 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 For VIPM related questions, you should probably post to the JKI Software Forums. We often post "How'd they do that?" articles. I'll ping the VIPM team to see if they could write a short article on the LabVIEW Version Selector ring. Cheers, -Jim Quote Link to comment
Callahan Posted January 27, 2009 Author Report Share Posted January 27, 2009 Thank you guys, I think it is not a picture ring, because when you click on it, you have a TEXT list, not a PICTURE list. Thank you Jim for your answer. I am impatient to know the trick ! ^^ Callahan Quote Link to comment
Yair Posted January 27, 2009 Report Share Posted January 27, 2009 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. Quote Link to comment
Callahan Posted January 27, 2009 Author Report Share Posted January 27, 2009 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... Quote Link to comment
Yair Posted January 27, 2009 Report Share Posted January 27, 2009 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). Quote Link to comment
jdunham Posted January 27, 2009 Report Share Posted January 27, 2009 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? Quote Link to comment
Yair Posted January 27, 2009 Report Share Posted January 27, 2009 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. Quote Link to comment
Callahan Posted January 27, 2009 Author Report Share Posted January 27, 2009 Thank you for the trick ! So...it's not a "special" control as I thought. Another question : Yair, I think that the VIPM source code is not open...You said " OK, so now I did look at VIPM itself "...How it is possible? Thanks, Callahan Quote Link to comment
Yair Posted January 28, 2009 Report Share Posted January 28, 2009 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.