04-18-2011 08:35 AM
Greetings All,
I've written a short display GUI that reads pressure out and am looking to make a fancier display for it. I'm trying to make something like the "numerictank" indicator that changes colors as it progresses. Currently, I can change the entire fill color, but I'm looking to go one step farther. I'd like it to change color in certain areas as it approaches a certain range.
For example: a numeric tank that goes from 0-15. I'd like to make the 0-5 range red, the 5-10 range yellow, and the 10-15 range green. This way all 3 colors will be displayed and not just changing the entire fill color. Is this possible with existing controls?
Many thanks for reading,
Rob
04-18-2011 08:59 AM - edited 04-18-2011 09:08 AM
Hi,
while you can not change the basic shape or functionality of existing controls within CVI (except with respect to colors) you can consider stacking several controls on top of each other, with parts of the control set to transparent.
this is an example of two tanks stacked on top of each other
04-18-2011 09:37 AM
Please forgive my ignorance 😞 I can set the transparency for the entire fill area, but cannot find out to set only part of it as transparent? 😞
I really like the look of your picture & it's exactly the type of thing i'm looking for 🙂
Can you point me to how to set only part of the tank transparent? Or does it have to be set in the code?
Thanks again,
Rob
04-18-2011 09:37 AM - edited 04-18-2011 09:41 AM
Sorry, duplicated post.
04-18-2011 09:38 AM - edited 04-18-2011 09:41 AM
If you are using CVI in a version from 8.5 on (not sure about 8.0), you can add a color ramp near the tank indicator: simply add some value in Color ramp settings dialog box in tank properties.
Here the tank with the color ramp and corresponding settings:
04-18-2011 09:41 AM
😞 Can't find a color ramp in 8.0.1 😞
04-18-2011 09:47 AM
It's not a special control: it's an attribute of the numerico control; if present, it can be found here:
04-18-2011 09:50 AM
Rob,
for the tank 'on top' the entire non-filled area is transparent (fill option: fill below)
04-18-2011 09:51 AM
Ok, I see that I don't have it in my version 😞
But I think I figured out how Wolfgang did the transparency thing... I'll update shortly 🙂
Thanks to all 🙂
04-18-2011 02:27 PM
Greetings all!
First off, I'd like to thank all that responded 🙂 It's good to have a spot to come & get help 🙂
Unfortunately, it seems that to do what I was trying to do, I had to just have 3 "tanks" stacked one on top of the other w/ their own separate ranges. I was able to make it look like one complete gauge 🙂
Thanks again for all the help!!!
Rob