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

Vadim Zeitlin vadim at wxwindows.org
Wed Apr 4 07:25:10 PDT 2007


On Mon, 02 Apr 2007 15:30:47 -0700 Robin Dunn <robin at alldunn.com> wrote:

RD> Vadim Zeitlin wrote:
RD> > On Mon, 02 Apr 2007 10:22:51 -0700 Robin Dunn <robin at alldunn.com> wrote:
RD> 
RD> > RD> but I think that there are still a lot of people that are just using
RD> > RD> wx.ScrolledWindow instead to hold controls.
RD> > 
RD> >  What if we raised an assert when more than one (or more than 2?)
RD> > child(ren) are added to wxScrolledWindow saying "use wxScrolledPanel as
RD> > control container"? 
RD> 
RD> wxGrid would trigger that assert.  It has 4 children, one of which is 
RD> its scroll target...
RD> 
RD> > Or are there valid reasons to use wxWindow (and not
RD> > wxPanel) as children container?
RD> 
RD> Even if we can't think of any I expect that plenty of our users will 
RD> have what they feel are very valid reasons.

 Ok, so my proposal doesn't look like a great idea. What about a bit
different one: rename wxScrolledWindow to wxScrolledControl and typedef
wxScrolledWindow to wxScrolledPanel (which would derive from wxPanel)?

 This would be backwards compatible but would still allow us to use
scrolled windows not deriving from wxPanel for wxListMainWindow and
similar. The only problem is that wxScrolledControl is a bad name as I
don't think it should derive from wxControl (or should it?) but I don't
have any other ideas about how to call it, the obvious wxScrolledWindow
being already taken.

 What do you think?
VZ





More information about the wx-dev mailing list