Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Delphi-gems Theme Mangager Group Box problems

216 views
Skip to first unread message

Bob Richardson

unread,
Dec 13, 2003, 6:51:02 PM12/13/03
to
I have found a few problems in the above mentioned component.

1. The caption on a GroupBox always has a font.color of Colbalt Blue, for XP
Color Schemes of Blue or Silver (or a rusty red when the color scheme is
Olive). The correct font name and font style is used, but not the correct
color.

2. The color of a GroupBox is taken from the Parent's color, whether or not
ParentColor is set to true or false.

Are there any work-a-rounds to these problems?

p.s. the Delphi-gems.support.thememanager newsgroup does not seem to be
working.


Rob Kennedy

unread,
Dec 13, 2003, 11:51:32 PM12/13/03
to
Bob Richardson wrote:
> 1. The caption on a GroupBox always has a font.color of Colbalt Blue,
> for XP Color Schemes of Blue or Silver (or a rusty red when the color
> scheme is Olive). The correct font name and font style is used, but
> not the correct color.

So, your complaint is that the control is using the colors the theme
dictated that it use? I don't really see a problem with that. It's what
you asked for when you included a TThemeManager and a manifest with your
project.

I suspect the necessary change to ignore the theme is toward the bottom
of TThemeManager.GroupBoxWindowProc.NewPaint, in the ThemeMgr unit.
Instead of calling ThemeServices.DrawText, call Windows.DrawText.

> 2. The color of a GroupBox is taken from the Parent's color, whether
> or not ParentColor is set to true or false.

If the problem is the same as the one with TPanels, then I've read that
you need to toggle the ParentColor property on and off again to ensure
that it gets stored in the DFM properly.

> p.s. the Delphi-gems.support.thememanager newsgroup does not seem to
> be working.

Mike Lischke has a terrible server, but he is moving to a new one,
eventually. As I write this message, his server is up. He also monitors
the Borland newsgroups sometimes, but I don't know whether he pays
attention to these Usenet groups.

--
Rob

Bob Richardson

unread,
Dec 14, 2003, 2:12:32 PM12/14/03
to

"Rob Kennedy" <.> wrote in message news:vtnr2m...@corp.supernews.com...

> Bob Richardson wrote:
> > 1. The caption on a GroupBox always has a font.color of Colbalt Blue,
> > for XP Color Schemes of Blue or Silver (or a rusty red when the color
> > scheme is Olive). The correct font name and font style is used, but
> > not the correct color.
>
> So, your complaint is that the control is using the colors the theme
> dictated that it use? I don't really see a problem with that. It's what
> you asked for when you included a TThemeManager and a manifest with your
> project.

There's no need to control those features that are already properties of the
Delphi component; e.g. font name, size, style, and color. There is a need
for things like the shape of the group box (square or rounded corners),
check box and radio button style, and other features that are not directly
under the control of Delphi. That's why I was surprised that control over
font.color was taken away by thememanager.

> I suspect the necessary change to ignore the theme is toward the bottom
> of TThemeManager.GroupBoxWindowProc.NewPaint, in the ThemeMgr unit.
> Instead of calling ThemeServices.DrawText, call Windows.DrawText.

I tried several approaches but wasn't able to change the text color.

> > 2. The color of a GroupBox is taken from the Parent's color, whether
> > or not ParentColor is set to true or false.
>
> If the problem is the same as the one with TPanels, then I've read that
> you need to toggle the ParentColor property on and off again to ensure
> that it gets stored in the DFM properly.

I tried this in FormShow, but to no avail.

groupbox2.parentcolor := true;
groupbox2.parentcolor := false;
groupbox2.color := clred;

The color still ended up silver....like the parent.


0 new messages