[wx-dev] [all] scrolled windows and panels

Vadim Zeitlin vadim at wxwindows.org
Thu Apr 5 05:22:48 PDT 2007


On Thu, 05 Apr 2007 13:18:28 +0100 Julian Smart <julian at anthemion.co.uk> wrote:

JS> Vadim Zeitlin wrote:
JS> >  So I think we need to accept focus by default in wxPanel then and override
JS> > wxPanel::AddChild() to check if it has more than one window accepting focus
JS> > and call SetAcceptFocus(false) if it does. And, of course, also undo this
JS> > in wxPanel::RemoveChild().
JS> >
JS> >  How does this sound?
JS> >   
JS> Sounds good to me!

 I believe this is also more or less what Robert meant and as he arrived to
it independently, this must be the right thing to do :-) And it should be
backwards compatible to a fault.

 BTW, in reply to a point of Robert's message, I don't think dynamically
changing the value returned from AcceptsFocus() is so outlandish. The
control may be in some (temporarily) "read only" state for example.

 Regards,
VZ





More information about the wx-dev mailing list