在wxpython中正确退出自定义模式对话框
我的应用程序有一个自定义对话框,使用户能够设置创建新文档的选项。主窗口有一个工具栏,即使关闭对话框后,工具栏按钮也不会返回到活动状态。我见过 if fileDialog.ShowModal() == wx.ID_OK:
获取返回值,但是还有其他东西可以再次启用按钮吗?仅发送 dialog.Destroy()
似乎并不能做到这一点。
My application has a custom dialog box that enables the user to set options on creating a new document. The main window has a toolbar, and even after dismissing the dialog, the toolbar buttons don't return to an active state. I've seen if fileDialog.ShowModal() == wx.ID_OK:
to get the return value, but is there something else that enables the buttons again? Just sending dialog.Destroy()
doesn't seem to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,如果您打开了一个“fileDialog”和一个“dialog”对象,那么您可能需要销毁它们。如果将工具栏按钮设置为禁用状态,则您需要在关闭对话框后启用它们。
Well, if you have a "fileDialog" and a "dialog" object open, then you probably need to Destroy them both. If you set the toolbar buttons into a Disabled state, you'll want to Enable them after you dismiss the dialogs.