def initChoices(self):
choiceControlBox = widgets.ControlBox(self, label='Choices', orient=wx.VERTICAL)
choiceGridSizer = wx.GridSizer(1, 2, 10, 10)
self.leftChoiceTextCtrl = wx.TextCtrl(parent=self, value=self.pg.choices[0],
style=wx.TE_PROCESS_ENTER)
self.Bind(wx.EVT_TEXT_ENTER, self.setChoices, self.leftChoiceTextCtrl)
self.leftChoiceTextCtrl.Bind(wx.EVT_KILL_FOCUS, self.setChoices, self.leftChoiceTextCtrl)
self.offlineControls += [self.leftChoiceTextCtrl]
choiceGridSizer.Add(self.leftChoiceTextCtrl, proportion=0,
flag=wx.ALL | wx.EXPAND, border=10)
self.rightChoiceTextCtrl = wx.TextCtrl(parent=self, value=self.pg.choices[1],
style=wx.TE_PROCESS_ENTER)
self.Bind(wx.EVT_TEXT_ENTER, self.setChoices, self.rightChoiceTextCtrl)
self.rightChoiceTextCtrl.Bind(wx.EVT_KILL_FOCUS, self.setChoices, self.rightChoiceTextCtrl)
self.offlineControls += [self.rightChoiceTextCtrl]
choiceGridSizer.Add(self.rightChoiceTextCtrl, proportion=0,
flag=wx.ALL | wx.EXPAND, border=10)
choiceControlBox.Add(choiceGridSizer, proportion=1,
flag=wx.ALL | wx.EXPAND, border=0)
self.sizer.Add(choiceControlBox, proportion=0, flag=wx.ALL | wx.EXPAND, border=10)
评论列表
文章目录