[wx-dev] Re: CanApplyThemeBorder()

Vadim Zeitlin vadim at wxwidgets.org
Tue Jan 1 12:18:06 PST 2008


On Tue, 01 Jan 2008 16:42:53 +0000 Julian Smart <julian at anthemion.co.uk> wrote:

JS> Whether a control already draws its theme, or whether the wxMSW 
JS> implementation should draw it explicitly, has nothing to do with the 
JS> platform-independent border styles in wxWidgets. It's entirely an 
JS> implementational detail.

 Ok, but then we should:

a) rename this CanApplyThemeBorder() to MSWDrawsThemeBorder() or something
   like that to make it clear that it's MSW-specific
b) make it return false in wxControl as native controls do draw their
   (themed or not) border themselves

shouldn't we?

JS> Huh? No, you'll get the themed border if you specify wxBORDER_THEME if 
JS> it makes sense for the control  - so, there won't be a border for a 
JS> wxStaticText, but there will be for a wxListBox or a wxRichTextCtrl. I 
JS> don't think there's a problem here.

 I think there is a big problem here. The border styles used to work
consistently: you got default border if you didn't specify any border style
and the given border if you used an explicit border style. With
wxBORDER_THEME you get either themed border or no border at all depending
on the control. I still believe that this a very bad idea and that it
should work in exactly the same way as the other styles, i.e. draw the
themed border if it's specified even for wxStaticText. The problem with
CanApplyThemeBorder() might be unrelated (or at least secondary) to this
one, but I still think that the current behaviour (as per your description
above) is a problem.

 Regards,
VZ




More information about the wx-dev mailing list