wxPanel and Sizers question

Markus von Ehr markus.vonehr at ipm.fhg.de
Thu Jan 23 16:31:29 CET 2003


Hi,

I want to create a Panel wherein several controls should be
displayed vertically arranged.
The problem is, that only the first button: "one" is
displayed. I don't know where the problem is, because in
several examples it's done like that.

class MyWindow(wxPanel):
    def __init__(self, parent, ID):
        wxPanel.__init__(self, parent, -1)
       
        box = wxBoxSizer(wxVERTICAL)
        box.AddWindow(wxButton(self, 1, "one"), 0, wxEXPAND)
        box.AddWindow(wxButton(self, 1, "two"), 0, wxEXPAND)
        box.AddWindow(wxButton(self, 1, "three"), 0, wxEXPAND)
        box.AddWindow(wxButton(self, 1, "four"), 0, wxEXPAND)

Any hints? Thanks,

Markus




More information about the Python-list mailing list