关闭应用程序的记事本每帧上的wxPython按钮

2024-04-19 19:59:42 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个wxpython类的Neoprobe,它有3个类/笔记本页面

class Neoprobe(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None, title="Neoprobe QC Application",size=(750,900))


        # Here we create a panel and a notebook on the panel
        panel = wx.Panel(self)
        nb = wx.Notebook(panel)

        # create the page windows as children of the notebook
        page1 = Sensitivity(nb)
        page2 = Angular(nb)
        page3 = Distance(nb)

        # add the pages to the notebook with the label to show on the tab
        nb.AddPage(page1, "Sensitivity")
        nb.AddPage(page2, "Angular")
        nb.AddPage(page3, "Distance")

我想要一个退出按钮,关闭应用程序的每一页的笔记本。例如,在“角度”页面中,我有以下代码

^{pr2}$

但是,这(显然)并不能关闭框宽x. 我该怎么做?在


Tags: theselfinitoncreate笔记本页面frame