Sorry, I received the mail with a wrong mail client, so
I had to break the thread.
Code example again:
#!/usr/bin/env python
from wxPython.wx import *
class app(wxApp):
def OnInit(self):
f=wxFrame(None, -1, 'hallo', wxDefaultPosition)
mainsizer=wxBoxSizer(wxVERTICAL)
f.SetAutoLayout(true)
f.SetSizer(mainsizer)
mainsizer.Add(wxStaticText(f, -1, "hello text"), 1, wxEXPAND)
mainsizer.Add(wxStaticText(f, -1, "another text"), 1, wxEXPAND)
notebook = wxNotebook(f, -1)
notesizer = wxNotebookSizer(notebook)
mainsizer.Add(notesizer, 1, wxEXPAND)
page = wxPanel(notebook, -1)
pagesizer=wxBoxSizer(wxVERTICAL)
page.SetAutoLayout(true)
page.SetSizer(pagesizer)
notebook.AddPage(page, "Hallo")
pagesizer.Add(wxStaticText(page, -1, "text on page"))
pagesizer.Add(wxStaticText(page, -1, "some more text on page"))
mainsizer.Fit(f)
f.Show(true)
self.SetTopWindow(f)
return true
a=app()
a.MainLoop()
What I get is:
···
+-----------------+
hello text |
>
another text |
>
-------+ |
Hallo |_________|
------------------+
As I must not add the pagesizer to the notesizer I
added it then to the mainsizer. ( mainsizer.Add(pagesizer) )
What I get now is:
+-----------------+
hello text |
>
another text |
>
-------+ |
Hallo |_________|
-----------------|
>
>
+-----------------+
The notebook page is too short and I can't see any text on it.
When sizing the frame bigger I can see the text in both
examples (with and without adding the pagesizer) but
the sizing does not seem work be correct.
Thanks for your help.
cu
Michael