def __init__( self, parent, id, titlemsg ):
wx.Dialog.__init__( self, parent, id, title=titlemsg )
MechList = []
for m in parent.ScoreServer.MechList.List:
MechList.append( str(m.ID) + ": " + str(m.Name) )
self.MechText = wx.StaticText( self, -1, "Mech Selection:" )
self.MechChoice = wx.ListBox( self, -1, style=wx.LB_EXTENDED, choices=MechList )
self.CancelButton = wx.Button( self, wx.ID_CANCEL, "Cancel" )
self.OKButton = wx.Button( self, wx.ID_OK, "OK" )
TopSizer = wx.BoxSizer( wx.VERTICAL )
BtnSizer = wx.BoxSizer( wx.HORIZONTAL )
BtnSizer.Add( self.CancelButton, 0, wx.ALL, 5 )
BtnSizer.Add( self.OKButton, 0, wx.ALL, 5 )
TopSizer.Add( self.MechText, 0, wx.ALL, 5 )
TopSizer.Add( self.MechChoice, 0, wx.ALL, 5 )
TopSizer.Add( BtnSizer, 0, wx.ALL|wx.CENTER, 5 )
self.SetSizer( TopSizer )
TopSizer.Fit( self )
评论列表
文章目录