[wxPython] [Q] wxTreeCtrl vs wxPanel

Hi,
I got a question while I was modifying Main.py of wxPython demos. I wanted
to put a wxPanel object instead of wxTreeCtrl object in the leftmost panel
and it did work. But there was a little difference in both cases. When
wxTreeCtrl was used, horizontal and vertical scroll bars were showed up, but
when wxPanel was used, it didn't happen. What makes this difference?
According to the reference document, wxTreeCtrl inherits wxControl,
wxWindow, wxEvtHandler, wxObject and wxPanel inherits wxWindow,
wxEvtHandler, wxObject and wxControl inherits wxWindow, wxEvtHandler,
wxObject. The only difference I found is that wxTreeCtrl is inherited from
wxControl and wxPanel is not. But wxControl section of the reference
document does not say anything about automatic scrolling. Is this the case?
What is the best way to put automatic scroll bar in wxPanel? Is there any
good example of this?

Thanks in advance.

YJ

I got a question while I was modifying Main.py of wxPython demos. I wanted
to put a wxPanel object instead of wxTreeCtrl object in the leftmost panel
and it did work. But there was a little difference in both cases. When
wxTreeCtrl was used, horizontal and vertical scroll bars were showed up,

but

when wxPanel was used, it didn't happen. What makes this difference?

wxTreeCtrl manages it's own scrollbars.

What is the best way to put automatic scroll bar in wxPanel? Is there any
good example of this?

Use wxScrolledWindow instead. See the demo.

ยทยทยท

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