How to create a control containing other controls?

Yes! I was calling SetSizer() previously. Changed it to SetSizerAndFit() and
the controls, though messed up together, showed up.... I will read up more on
sizer now.

Thanks a lot, and also for the wonderful wxpython.

>
> My problem is that my custom controls are not showing up. There is no

error

> message.
>
> What I want to do is to create a custom control that contains other

controls

> (such as StaticText, Button..etc) in it.
>
> What I did was that I created a frame, I put a wxScrolledPanel in it, then

I

ยทยทยท

> put my custom control in it. I have tried derive my custom control from
> wx.Window, wx.Panel, and wx.Control, but none work. My custom control
> simply
> contained a wx.StaticText and a wx.Button. They were created in my custom

> control's __init__() method.
>
> I also used Sizer in the wxScrolledPanel to arrange my custom controls
> (vertical box sizer), and my custom control used a horizontal box sizer to

> arrange the StaticText and Button.
>
Does your custom control set its own initial size to be big enough to
hold all its children? (Either explicitly or if it has its own sizer
then using the SetSizerAndFit method or something similar...)
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!