Can't get wxGrid to work

Erik Lechak prochak at netzero.net
Tue Nov 4 01:13:56 EST 2003


Hello,


> self.gridPart2 = wxGrid(id=wxID_WXHAP2004GRIDPART2, name='gridPart2',
>                 parent=self.pnlPersInfo, pos=wxPoint(280, 104), size=wxSize(112,
>                 176), style=wxSIMPLE_BORDER)

Don't forget to self.gridPar2.CreateGrid(rows,cols)

wxGrid isn't as dynamic or intuitive or whatever you want to call it. 
You have to explicitly tell it how many rows and cols you have.  Look
at AppendRows, AppendCols, DeleteRows, and DeleteCols.  Dont try to
CreateGrid more than once.

Hope this helps,
Erik Lechak




More information about the Python-list mailing list