Theme and Background Color

The place for threads about TimoSoft ButtonControls.
Post Reply
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Theme and Background Color

Post by Mex »

Hi!

Found strange behavior.

Set forms background color to white or any other color.
Add Checkbox to form and change background color to same color as forms bg.

When Aero theme is on, then checkbox background color is not selected color, but system color?


Regards
Meelis
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Theme and Background Color

Post by TiKu »

Hi,

As documented: "This property [CheckBox.BackColor] isn't supported for themed checkboxes."

Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Theme and Background Color

Post by Mex »

Hi,

I always forget to RTFM :D


But is there a way to use BG color, DrawThemeParentBackground API for example?


Regards
Meelis
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Theme and Background Color

Post by TiKu »

In the past I've tried hard to support a custom background color if the controls are themed. As far as I remember there have been two problems:
  1. On TabStrip controls, the controls should be drawn with a transparent background. So there was a (solvable) logical problem: Should the BackColor be ignored then or should the background become opaque? This problem can be solved by introducing some additional property or by allowing a magic value (e.g. -1) for the BackColor property - but it would be difficult to implement it in a way that would not break existing applications.
    Additionally I remember code-wise problems, but I'm not sure anymore whether these problems existed only because I've been trying to keep compatibility with existing applications.
  2. As far as I remember, it was not possible to customize the foreground (text) color. Being able to change one color but not the other, seemed inconsistent.
I think I'll check out the possibilities again and then decide whether I will
  • implement it at all.
  • break compatibility. This would likely result in a new major version of the library, requiring new GUIDs and therefore also some kind of upgrade tool that can be used to upgrade existing projects in a comfortable way.
I hope that by sunday evening I'll know what I'll do. If the result will be a new major version, you should not expect it anytime soon (i.e. not before spring), because it would mean quite some work and I would also think hard to find other things that could be improved by breaking compatibility.

Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Theme and Background Color

Post by Mex »

Breaking compatibility is not a good idea, i think. If it's too hard to implement, then let it be.


Thnx
Meelis
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Theme and Background Color

Post by TiKu »

Hi,

I've finally found time to check out the possibilities. I did remember correctly: Only the background color could be changed. Allowing to customize the background color, but not the text color does not seem very useful.
I also tried to implement a transparent background mode instead, so that the checkbox would appear transparent not only on tab strip controls, but also on Forms. But so far all my attempts failed.

Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Post Reply