Hi Werner,
Hi Kevin,
...
And there is a wx.lib.scrolledpanel which is based on above.
As a hack I copied the sc.sizedpanel code to a module and changed it to inherit from wx.lib.scrolledpanel and in its __init__ method called self.SetupScrolling().
Should probably also do:
self.SetSizerProps(expand=True, proportion=1)
Currently have this in my code but without it the scrolledPanel is not showing all the controls one adds to it.
To do this correctly I would have to move the methods "AddChild", "GetSizerType" and "SetSizerType" into "something" and have both the sizedcontrol.SizedPanel and sizedcontrols.SizedScrolledPanel inherit from "something". What is the correct way of doing this? A mixin with these three and change everything to use "super", e.g.
change:
sp.ScrolledPanel.base_AddChild(self, child)
to:
super(SizedScrolledPanel, self).base_AddChild(self, child)
Or can't this be done with a mixin, any pointers on how it could be done would be appreciated.
Thanks for checking into this! I forgot about wx.lib.scrolledpanel, and obviously also wx.PyScrolledWindow. 
Yeah, as you were thinking, what I'd suggest is to abstract the sc.SizedPanel code out into a SizedParent mixin class, and have SizedPanel, a new SizedScrolledWindow derived from wx.PyScrolledWindow, and a new SizedScrolledPanel derived from wx.lib.scrolledpanel's ScrolledPanel, all inherit from SizedParent. I'd be happy to look at a patch for this. 
O.k. I slowly getting there - not sure it meets approval but so far it works for me and I like to check before going further with it (definitely needs more testing and might try the ScrolledWindow one, also I don't need this at this point).
Cool, thanks! 
My initial go was to basically rename existing sc.SizedPanel to sc.SizedParent and get rid of the __init__ code, however I couldn't make the new sc.SizedPanel (which was basically just the old __init__ code to see the AddChild, SetSizerType and GetSizerType methods.
Anyhow even if above worked I am not aware of a way to handle the following type of code "sp.ScrolledPanel.SetSizer(self, sizer)" in SizedParent that always the correct base class would be called.
Yeah, if the mixin isn't working, it is most likely something to do with how the SWIG bindings override the virtuals. Robin may know more about this, but I sort of suspect we'll need to do it this way for now.
If anyone can point me to some documentation/sample code on how this can be done I have another look.
In the mean time attached is a proposed patch using a different way which still has a minimal amount of duplicated code in the different sub-classes.
I am putting the helmet on - so please comment on this;-)
I'll try to play with this patch sometime this weekend, but just checking the code, it looks good. One thing I noticed, though, is that your patch seems to have mixed Windows / Unix line endings.
Werner
P.S. Am I really the only one who uses "Auto trim whitespace on save" in his editor? I get caught each time (o.k. not that often - at least not yet;-) ) when I a do a patch, I end up with tons of non relevant changes and have to go back and redo things.
In my experience, yes, you are.
The problem is, as you say, that when you start using it, anytime you start working with someone else's code who doesn't use it, you get a lot of whitespace change noise in your patches. Then that makes patches hard to review. 
What I think would make such a switch more feasible is a script that goes through a source tree and strips whitespace. This way you can get all the whitespace changes out of the way in one commit, and then have everyone switch to that option if everyone's editors support it.
Thanks,
Kevin
···
On Oct 13, 2011, at 7:26 AM, werner wrote:
On 10/12/2011 06:05 PM, Kevin Ollivier wrote:
--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en<sizedcontrol1\.patch>