splitter with scrollbar

In the wxPython book, a split window is created using this code:

self.sp = wx.SplitterWindow(self)
self.p1 = wx.Panel(self.sp, -1)
self.p2 = wx.Panel(self.sp,-1)

Elsewhere in the book it says that scroll windows can be used anywhere that wx.Panel is used, but when I try to substitute wx.ScrolledWindow for wx.Panel in the code above, I don’t get scrolled windows within the panel. Anyone know what I’m doing wrong?

Thanks,
Gabriel

Gabriel Murray wrote:

In the wxPython book, a split window is created using this code:

self.sp = wx.SplitterWindow(self)
self.p1 = wx.Panel(self.sp, -1)
self.p2 = wx.Panel(self.sp,-1)

Elsewhere in the book it says that scroll windows can be used anywhere that wx.Panel is used, but when I try to substitute wx.ScrolledWindow for wx.Panel in the code above, I don't get scrolled windows within the panel. Anyone know what I'm doing wrong?

Are you doing anything to cause the scrolled windows to activate their scrollbars? (IOW, setting the virtual size to be larger than the client size, or calling SetScrollbars, etc.)

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!