您的位置首页  资讯

magbox YES_NOwx

mportwxclassMyFrame(wx.Frame):def__init__(self,parent,id):wx.Frame.__init__(self,parent,id,u'测试面板duPanel',size=())#创建面板panel=wx

mport wxclass MyFrame(wx.Frame):def __init__(self, parent, id):wx.Frame.__init__(self, parent, id, u'测试面板duPanel', size = ())#创建面板panel = wx.Panel(self)#在Panel上添加Buttonbutton = wx.Button(panel, label = u'关闭', pos = (, ), size = (, ))#绑定单击事件self.Bind(wx.EVT_BUTTON, self.OnCloseMe, button)def OnCloseMe(self, event):dlg = wx.MessageDialog(None, u"消息对话框测试", u"标题信息", wx.YES_NO wx.ICON_QUESTION)if dlg.ShowModal() == wx.ID_YES:self.Close(True)dlg.Destroy()if __name__ == '__main__':app = wx.PySimpleApp()frame = MyFrame(parent = None, id = -)frame.Show()app.MainLoop()

免责声明:本站所有信息均搜集自互联网,并不代表本站观点,本站不对其真实合法性负责。如有信息侵犯了您的权益,请告知,本站将立刻处理。
网站推荐更多>>