Newbie question: wxNotebook

Lexy Zhitenev zhitenev at cs.vsu.ru
Tue Jan 21 11:56:45 EST 2003


"Markus von Ehr" <markus.vonehr at ipm.fhg.de> ???????/???????? ? ????????
?????????: news:3E2D1E57.19CC5FC4 at ipm.fhg.de...
> I want to add a control Panel on the left side.
> In this Panel I want a Notebook filling the whole available space.
> Unfortunately the notebook remains very small, too small for placing
> controls inside.
> What can I do that the notebook always fills the whole available area,
> independent of the parents size?
>

Yes, sizers and layouts don't work for wxNotebook. I hope it will be fixed
in the next versions. The only thing I can propose is to use code like that.
I use this variant:

        nb = wxNotebook(self, -1, (0, 0), size=self.GetClientSize(), style =
wxNB_BOTTOM)
        def OnFrameSize(evt, self=self, nb=nb):
            nb.SetSize(self.GetClientSize())
        EVT_SIZE(self, OnFrameSize)

This works for all cases, at least in Windows. self here is wxNotebook
parent.

Best regards, Lexy.






More information about the Python-list mailing list