我想锁定组合框,以防止用户在输入开始按钮后选择其他任何内容。
这是因为我在一个接口上做了一个监控过程。组合框有接口名称列表。一旦我启动监控器,我不希望用户选择其他接口卡,直到它停止。
有什么办法吗?
selectedInterface = self.interfaces_cblist.GetValue()
self.selectInterfaceStr = str(selectedInterface)
if len(selectedInterface) == 0:
noSelect_error = wx.MessageDialog(None,"Please select an interface","",wx.OK|wx.ICON_ERROR)
noSelect_error.ShowModal()
else:
monitorStarted = wx.MessageDialog(None,"Monitor on %s started"%self.selectInterfaceStr,"",wx.OK|wx.ICON_ERROR)
monitorStarted.ShowModal()
self.monitorInterface_button.Disable()
self.abortValue = 1;
self.camDetect = multiprocessing.Process(target=self.camtableDetection,args=(self.selectInterfaceStr,))
self.dhcpDetect = multiprocessing.Process(target=self.dhcpexhaustion,args=(self.selectInterfaceStr,))
self.camDetect.start()
self.dhcpDetect.start()