OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: Emiliano on May 28, 2014, 01:39:43 AM

Title: Background Color Label
Post by: Emiliano on May 28, 2014, 01:39:43 AM
Hello,
I noticed that in some PCs (not all, maybe with different OS) the same project OpenDCL, displays the label disabled with dark gray background.
This makes the dialogue very bad.

I note that the setting 'background', all of the controls, is -24

See attached image.
How can I fix this annoying problem?

Title: Re: Background Color Label
Post by: owenwengerd on May 28, 2014, 07:39:39 AM
Handling control backgrounds is very complicated, so it's possible this is a bug. It's also possible you're seeing the use of visual styles, which override the Windows default behaviors. Try setting the Use Visual Styles property to False for each control.
Title: Re: Background Color Label
Post by: Emiliano on May 28, 2014, 11:57:32 PM
I remember seeing in the past, the property "visual styles", but now I can not find it in any control:-[

I noticed that the problem of background is very evident in the "palette", while in the Control Bar is almost acceptable.
See the attached images.

PS. Another thing that can be useful for certain the bug: I noticed that the difference in background is much more evident with the Windows theme (color scheme: light gray) compared with the standard theme; so it seems that the controls are not transparent
Title: Re: Background Color Label
Post by: Emiliano on May 29, 2014, 01:07:54 AM
IMPORTANT:
I noticed that the problem of the background of the label in the Control Bar will only occur if set with Openstudio,
If in Openstudio the 'Enable' is True, and set it to False from code, the background is correct!
Title: Re: Background Color Label
Post by: owenwengerd on May 29, 2014, 03:37:23 AM
Your observation is correct that the "transparent" background is not transparent in the optics sense. Instead, transparent background means "match the parent control's background".
Title: Re: Background Color Label
Post by: Emiliano on May 29, 2014, 03:55:13 AM
Quote from: owenwengerd on May 29, 2014, 03:37:23 AM
Your observation is correct that the "transparent" background is not transparent in the optics sense. Instead, transparent background means "match the parent control's background".

Ok, but the control does not assume the background color of the control's parent; then this is a bug ?
Title: Re: Background Color Label
Post by: owenwengerd on May 29, 2014, 04:53:15 AM
As I mentioned earlier, your visual styles overrides the background color. You haven't said whether you have Use Visual Style enabled, so I'm not sure whether it's a bug.
Title: Re: Background Color Label
Post by: Emiliano on May 29, 2014, 05:08:57 AM
I think this is a bug because if I set the property Enabled = False from code, the background of the label does not change, and this is correct!
Instead, if I change the same property from Openstudio the background of the label becomes darker.

I have not activated the property "Use Visual Style" because it is not available for the Label.

I look forward to hearing from you about.
Thank you for your help.