wxNotebook in a wxWindow doesn't stretch

Robin Dunn robin at alldunn.com
Mon Jul 17 22:19:52 EDT 2000


> I've only recently started to learn wxPython, but I think I might have hit
a
> similar problem:
>
> I had trouble getting constraints to make a number of controls sit side by
> side, having widths that were proportional to the width of the entire
frame.
>

Sizers work nicely for this, but it's doable with constraints too.

> Now, the only way to get it going was to embed the controls in ANOTHER
> container, which is placed on the wxFrame that is your main application.
> So, instead of creating a wxApp that contained a wxFrame that contained
the
> controls, I had to create a wxApp, that contained a wxFrame, that
contained
> a wxPanel (or maybe another wxFrame), which contained the controls.
>

Actually, it's recommended to place controls on a wxPanel since that is what
handles the tab-key traversal between controls.

>
> I've seen the author of wxPython (Robin Dunn?) post in this newsgroup, so
> maybe he'd be able to shed some light on this. (???)
>

I answered the original posters question in the wxPython-users list.  It was
because he put the items controled by the sizer on a wxWindow, which doesn't
automatically handle the auto-layout flag.  Substituting wxPanel there took
care of the problem.


--
Robin Dunn
Software Craftsman
robin at AllDunn.com
http://wxpython.org     Java give you jitters?
http://wxpros.com        Relax with wxPython!






More information about the Python-list mailing list