PyCollapsiblePane

Hi Andrea,

I just committed some changes to PyCollapsiblePane. If you have some time available could you please check them for me?

http://trac.wxwidgets.org/changeset/60089/wxPython/3rdParty/AGW
http://trac.wxwidgets.org/changeset/60090/wxPython/3rdParty/AGW

I added a new style where the expanded pane is surrounded by a static box, and the toggle button is situated on upper left edge of the box. When it is collapsed then all you can see is the button. I think it has a very nice look and feel.

http://dl.getdropbox.com/u/727255/CP-sbox-Snap001.png

I made it possible when using the old style to choose positioning the static line above or to the side of the button on any platform. Personally I really dislike the positioning above the button that it (and the C++ version) was/is doing by default on the Mac.

I also changed it to derive from wx.PyPanel instead of wx.PyControl since it has child widgets. wx.Control doesn't deal very well with moving tab traversal into and out of itself when it is a container and Panels do. Unfortunately this means that the validator parameter is now worthless, but I'm not sure what good a validator would be for a collapsible pane widget anyway. This makes it diverge a bit from the C++ collapsible pane widget, but I don't think that poses much of a problem in this case.

Finally I refactored the code somewhat to accommodate these changes. I'm hoping I didn't make any silly mistakes here, which is why I'd like you to give it a look to be sure.

Thanks.

···

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

Hi Robin,

Hi Andrea,

I just committed some changes to PyCollapsiblePane. If you have some time
available could you please check them for me?

wxTrac has been migrated to GitHub Issues - wxWidgets
wxTrac has been migrated to GitHub Issues - wxWidgets

I added a new style where the expanded pane is surrounded by a static box,
and the toggle button is situated on upper left edge of the box. When it is
collapsed then all you can see is the button. I think it has a very nice
look and feel.

http://dl.getdropbox.com/u/727255/CP-sbox-Snap001.png

I made it possible when using the old style to choose positioning the static
line above or to the side of the button on any platform. Personally I really
dislike the positioning above the button that it (and the C++ version)
was/is doing by default on the Mac.

I also changed it to derive from wx.PyPanel instead of wx.PyControl since it
has child widgets. wx.Control doesn't deal very well with moving tab
traversal into and out of itself when it is a container and Panels do.
Unfortunately this means that the validator parameter is now worthless, but
I'm not sure what good a validator would be for a collapsible pane widget
anyway. This makes it diverge a bit from the C++ collapsible pane widget,
but I don't think that poses much of a problem in this case.

Finally I refactored the code somewhat to accommodate these changes. I'm
hoping I didn't make any silly mistakes here, which is why I'd like you to
give it a look to be sure.

I have just updated my copy of SVN and tried PyCollapsiblePane. The
new style looks pretty slick, and I agree with you that it may look
much better on the Mac (although I don't have any direct experience, I
like the screenshot you posted).

I don't see anything strange in the implementation, everything seems
to work correctly on Window XP. I'll try and do some testing on GTK
next week but at first sight everything looks fine.

Thank you!

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On Fri, Apr 10, 2009 at 10:20 PM, Robin Dunn wrote: