Dear list members,
I have a problem with using Tree Control inside a panel or scrolled
panel. This is my layout.
ScrolledPanelAGAIN.pyw (2.55 KB)
···
+----------------------------------------+
header |
+----------------------------------------+
<Root> |
+-- Child |
....
+----------------------------------------+
(I have attached an image about what I am trying to do, from
Thunderbird. That is the exact interface I am trying to create for a
different application, though)
Now what is happening is the tree control is created with the
defaultsize but I want it to be sized to the width of the panel and
the remaining height of the panel. It _seems_ to work but during some
resizes it snaps back to the original default size.
Can someone please look at the attached code and see if something is
glaring in it because I have tried different things to get it to work?
Also, when I use treecontrol inside a scrolled panel, how can I make
the tree scrolling same as the scrolled panels scroll bars? I get both
scroll bars when the tree control is larger the visible size of the
scroll panel.
I would also appreciate any inputs on the implementation. At present I
have used a splitter window with the left splitter containing a
scrolled panel. The scrolled panel :
1. contains a custom panel that has the text "Folder", and a bitmap
button next to it for some options, both in a horizontal boxsizer
2. has the tree control is below the custom header, laid out in a
vertical boxsizer.
Is there any reason that sash windows must be used in place of
splitter windows to create a two-pane interface?
Thank you,
-Kartic
PS: The code attached is only for the tree resizing part but is
adapted from the scrolled panel demo code.