[Tutor] Stuck with classes
Lloyd Kvam
lkvam@venix.com
Thu, 04 Oct 2001 14:08:23 -0400
I don't follow what you are doing but....
gg.addGen(p)
AND within the addGen method
yyy.AddWindow(p.GridSizer, ...)
should be proper python statements. (I don't know what gr is in your sni=
ppet since there is no return from makeGrid)
Danny Kohn wrote:
> =
> Hi.
> Have the following problem that I cannot seem to figure out.
> =
> class matrixPanel(wxPanel):
> def __init__(self, parent, id):
> wxPanel.__init__(self, parent, id, wxDefaultPosition, w=
xPyDefaultSize)
> =
> def makeGrid():
> self.GridSizer =3D wxFlexGridSizer( 2, 3, 1, 1 )
> [...]
> =
> class genGrid:
> def __init__(self):
> pass
> def addGen(self, panel):
> # Create Function table
> self.DescWin =3D wxGrid(...)
> [...]
> yyy.AddWindow( ...)
> =
> p =3D matrixPanel(frame1, -1)
> gr =3D p.makeGrid
> gg=3DgenGrid()
> [?]
> =
> How in earth do I pass self.GridSizer in matrixPanel to yyy? Or do I ha=
ve to do this in a nested class. I have tried that also with disappointin=
g results.
> =
> Thanks.
> Danny Kohn Tel: +46 (708) 140 300 (\_/) ))
> ICQ: 1328817 ('.')=3D// Miau!
> Ham: SM=D8NBJ ( ~~~ )/ Rrrrrui!
> `w---w=B4
> =
> _______________________________________________
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
-- =
Lloyd Kvam
Venix Corp.
1 Court Street, Suite 378
Lebanon, NH 03766-1358
voice: 603-443-6155
fax: 801-459-9582