自己试着写了一个对话框class,想在对话框关闭事件中做一些判断,使用
Bind(wx.EVT_CLOSE,self.OnCloseWindow)但是不成功。高手帮忙
看看。(电视里面意大利对罗马尼亚刚好一比一了.)
import wx
class myDialog(wx.Dialog):
def __init__(self,parent,id,title):
self.value = 0
wx.Dialog.__init__(self,parent,id,title,(-1,-1),(300,300),wx.CAPTION|wx.CLOSE_BOX,"myDialog")
self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
def>
主要就是两个问题...
wx.CAPTION|wx.CLOSE_BOX
这个style 会让你的对话框 连关闭按钮都没有
ret = dial.Show()
这里应该是 ShowModal
会员注册
会员登录
个人空间
发表评论