Controls and background colors

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
bryan
Member
Posts: 31
Joined: Sun Dec 17, 2006 8:41 am

Controls and background colors

Post by bryan »

Hi,

I have a question related to controls. I have an indicator with two states and correspondingly, two colors. On top of this indicator, I have a property label. I'd like the background of the property label to be the color of whatever state the indicator is in (green/blue). However, when I place the property label on the indicator, and click "transparent background" the panel image color below the indicator becomes the property label background (orange). Somehow, I think this is expected behavior for the control, but it's not what I want.

Can I get the indicator color to show up as my property label background? If so, how?

Thanks,
Bryan
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Controls and background colors

Post by ScottBot »

It's because the indicator controls aren't 'layer-able' like some of the others. It might take a little more work, but you should be able to accomplish the same behavior of the indicator with a dynamic image (which is layer-able).
Scott
bryan
Member
Posts: 31
Joined: Sun Dec 17, 2006 8:41 am

Re: Controls and background colors

Post by bryan »

Thanks Scott.

I implemented the dynamic image approach, which correctly displays the color of the underlying image (initially green) as the background of the property label, when the label is marked "transparent background". However, when the image changes, say from green to blue, the background of the property label stays green. I'm using CE for my SR, so I tested it on the local remote and it worked correctly. Looks like a CE specific issue.

Bryan
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Controls and background colors

Post by ScottBot »

Sorry about the bad idea then. I wasn't aware of the CE issue.

My only other idea would be that if the Property Value you are trying to display only has a few different values, you could incorporate the text into the image and just have several more image states.
Scott
Post Reply