【发布时间】:2014-02-16 21:32:32
【问题描述】:
我像这样初始化wx.ListBox:
mylistbox = wx.ListBox(self, style=wx.LB_SINGLE)
mylistbox.Bind(wx.EVT_LISTBOX, self.OnEventListBox)
# some other things (append some items to the list)
mylistbox.SetSelection(5)
我也有:
def OnEventListBox(self, event):
print 'hello'
# plus lots of other things
如何使初始化中的命令mylistbox.SetSelection(5)紧跟OnEventListBox的调用?
备注 : SetSelection() 好像没有自动生成 wx.EVT_LISTBOX。
【问题讨论】:
标签: python events listbox wxpython wxwidgets