wx.PyControl Vs wx.Panel as a base class For composite widgets?

When building rich composite widgets is there any advantages /
disadvantages of using wx.PyControl over wx.Panel or vice-versa as a
base class or is it a simply stylistic choice?

I can only speak on the advantages of wx.Panel, which are as follows:

1) Enables proper tabbing between children
2) Makes the frame look "right" on all platforms
3) Something else, but I can't remember what it is

I don't know how the wx.PyControl compares. Robin or one of the other
guys with deep wx experience will have to speak up on that.

···

On Jul 22, 7:32 pm, Jonah Murphy <jonah.mur...@gmail.com> wrote:

When building rich composite widgets is there any advantages /
disadvantages of using wx.PyControl over wx.Panel or vice-versa as a
base class or is it a simply stylistic choice?

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

Hi,

When building rich composite widgets is there any advantages /
disadvantages of using wx.PyControl over wx.Panel or vice-versa as a
base class or is it a simply stylistic choice?

If by "composite widget" you mean that your just want to group a
number of other controls together to perform some task. Then a Panel
may be better because you can use sizers with a panel.

If you mean you want to create your own fully custom user drawn
control you will probably be better using PyControl as a base class
since it exposes a number of virtual functions that are often needed
to implement custom functionality.

http://wiki.wxpython.org/CreatingCustomControls

Cody

···

On Thu, Jul 22, 2010 at 7:32 PM, Jonah Murphy <jonah.murphy@gmail.com> wrote:

By composite widget I mean a widget made up of number of the standard
widgets. The widgets that make up the composite widget are
encapsulated and there events synthesized into higher level event/s.
I have tried both approaches (PyControl and Panel), both allowed the
use of sizers the only real difference in code when using PyControl
been that EVT_SIZE needs to handled to re Layout() widget.