[wxPython] wxPySizer vs wxSizer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] wxPySizer vs wxSizer

Jethro Cramp
--------------
Idle curiosity
--------------

In the notes about wxSizer there is a special note for wxPython saying that

"If you wish to create a sizer class in wxPython you should derive the class
from wxPySizer in order to get Python-aware capabilities for the various
virtual methods."

Does this mean that the wxBoxSizer and wxStaticBoxSizer classes are both
based on teh wxPySizer class rather than the wxSizer class?

Regards,

Jethro


_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] wxPySizer vs wxSizer

Robin Dunn
>
> In the notes about wxSizer there is a special note for wxPython saying that
>
> "If you wish to create a sizer class in wxPython you should derive the
class
> from wxPySizer in order to get Python-aware capabilities for the various
> virtual methods."
>
> Does this mean that the wxBoxSizer and wxStaticBoxSizer classes are both
> based on teh wxPySizer class rather than the wxSizer class?
>

No, they are just wrappers around their C++ classes.  wxPySizer is a special
class derived from wxSizer that knows how to redirect calls to the virtual
C++ methods to the Python methods if they exist.

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users