i'm using MDIParentFrame (MDIParentFrame1) with 2
MDIChildFrames
(MDIChildFrame1, MDIChildFrame2) as children...
the parent module generates a list (6 all in all),
say:
list1[]
list2[]
list3[]
list4[]
list5[]
list6[]
how would i be able to use these lists in the child
frames (i'm going
to put them in a wxGrid as a table in one frame and
do some
graphing on the other frame.)
i've done something like this in the "table" frame:
def myGridInit(self):
self.grid1.CreateGrid(100,5)
self.grid1.SetColLabelValue(0, "List1")
self.grid1.SetColLabelValue(1, "List2")
self.grid1.SetColLabelValue(2, "List3")
self.grid1.SetColLabelValue(3, "List4")
self.grid1.SetColLabelValue(4, "List5")
self.grid1.SetColLabelValue(5, "List6")
self.grid1.SetColSize(2, 125)
self.grid1.SetColSize(3, 127)
self.grid1.SetColLabelAlignment(wxALIGN_LEFT,
wxALIGN_BOTTOM)
lendata = len(wxMDIParentFrame1.List1) #what
prefix to use???
for ii in xrange(lendata):
grid.SetCellValue(ii, 0,
wxMDIParentFrame1.List1[ii])
#what prefix to use???
grid.SetCellValue(ii, 1,
wxMDIParentFrame1.List2[ii])
#what prefix to use???
grid.SetCellValue(ii, 2,
wxMDIParentFrame1.List3[ii])
#what prefix to use???
grid.SetCellValue(ii, 3,
wxMDIParentFrame1.List4[ii])
#what prefix to use???
grid.SetCellValue(ii, 4,
wxMDIParentFrame1.List5[ii])
#what prefix to use???
grid.SetCellValue(ii, 4,
wxMDIParentFrame1.List6[ii])
#what prefix to use???
def _init_ctrls(self, prnt):
# generated method, don't edit
wxMDIChildFrame.__init__(self,
id=wxID_WXMDICHILDFRAME1,
name='WXMDICHILDFRAME1', parent=prnt,
pos=wxPoint(1, 1),
size=wxSize(723, 347),
style=wxHSCROLL | wxVSCROLL |
wxTAB_TRAVERSAL |
wxDEFAULT_FRAME_STYLE,
title='Table')
self.SetClientSize(wxSize(715, 320))
self.grid1 =
wxGrid(id=wxID_WXMDICHILDFRAME1GRID1, name='grid1',
parent=self, pos=wxPoint(0, 0),
size=wxSize(715, 320),
style=wxTAB_TRAVERSAL)
def __init__(self, parent):
self._init_ctrls(parent)
self.myGridInit()
and also, any tips on improving this "table" frame,
and also, am
planning to use matplotlib in the graphing frame,
should i put in
wxPanel on the child frame???
thanks, any help will greatly be appreciated!
···
__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250