From 7519c97115955ab8bac9bdc202643efd473d5b6e Mon Sep 17 00:00:00 2001 From: danamir Date: Fri, 9 Mar 2018 16:18:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=BE=D1=80=D0=B3=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B0=20=D1=81=D1=82=D1=80?= =?UTF-8?q?=D1=83=D0=BA=D1=82=D1=83=D1=80=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B5?= =?UTF-8?q?=D0=BA=D1=82=D0=B0.=20=D0=9B=D0=B0=D0=B1=D0=BE=D1=80=D0=B0?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D0=BD=D1=8B=D0=B5=20=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D1=8B=20=D0=B2=D1=8B=D0=BD=D0=B5=D1=81=D0=B5=D0=BD=D1=8B?= =?UTF-8?q?=20=D0=B2=20=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B?= =?UTF-8?q?=D0=B5=20=D0=BF=D0=B0=D0=BF=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/second_page.py | 4 ++-- gui/third_page.py | 52 ------------------------------------------- {gui => lab1}/lab1.py | 28 +++++++++-------------- 3 files changed, 13 insertions(+), 71 deletions(-) delete mode 100644 gui/third_page.py rename {gui => lab1}/lab1.py (57%) diff --git a/gui/second_page.py b/gui/second_page.py index 23a157a..3489ea5 100644 --- a/gui/second_page.py +++ b/gui/second_page.py @@ -43,8 +43,8 @@ class SecondPage(wx.Frame): # Virtual event handlers, overide them in your derived class def lab1(self, event): - from gui import third_page - nex_page = third_page.MainFrame() + from lab1 import lab1 + nex_page = lab1.MainFrame() nex_page.Show() diff --git a/gui/third_page.py b/gui/third_page.py deleted file mode 100644 index e76640c..0000000 --- a/gui/third_page.py +++ /dev/null @@ -1,52 +0,0 @@ -import wx - - -# Some classes to use for the notebook pages. Obviously you would -# want to use something more meaningful for your application, these -# are just for illustration. - -class PageOne(wx.Panel): - def __init__(self, parent): - wx.Panel.__init__(self, parent) - t = wx.StaticText(self, -1, "This is a PageOne object", (20,20)) - -class PageTwo(wx.Panel): - def __init__(self, parent): - wx.Panel.__init__(self, parent) - t = wx.StaticText(self, -1, "This is a PageTwo object", (40,40)) - -class PageThree(wx.Panel): - def __init__(self, parent): - wx.Panel.__init__(self, parent) - t = wx.StaticText(self, -1, "This is a PageThree object", (60,60)) - - -class MainFrame(wx.Frame): - def __init__(self): - wx.Frame.__init__(self, None, title="Simple Notebook Example") - - # Here we create a panel and a notebook on the panel - p = wx.Panel(self) - nb = wx.Notebook(p) - - # create the page windows as children of the notebook - page1 = PageOne(nb) - page2 = PageTwo(nb) - page3 = PageThree(nb) - - # add the pages to the notebook with the label to show on the tab - nb.AddPage(page1, "Page 1") - nb.AddPage(page2, "Page 2") - nb.AddPage(page3, "Page 3") - - # finally, put the notebook in a sizer for the panel to manage - # the layout - sizer = wx.BoxSizer() - sizer.Add(nb, 1, wx.EXPAND) - p.SetSizer(sizer) - - -if __name__ == "__main__": - app = wx.App() - MainFrame().Show() - app.MainLoop() \ No newline at end of file diff --git a/gui/lab1.py b/lab1/lab1.py similarity index 57% rename from gui/lab1.py rename to lab1/lab1.py index e76640c..6eb0bde 100644 --- a/gui/lab1.py +++ b/lab1/lab1.py @@ -1,24 +1,18 @@ import wx - -# Some classes to use for the notebook pages. Obviously you would -# want to use something more meaningful for your application, these -# are just for illustration. - -class PageOne(wx.Panel): +class Ttheory(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent) - t = wx.StaticText(self, -1, "This is a PageOne object", (20,20)) -class PageTwo(wx.Panel): + +class Labs(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent) - t = wx.StaticText(self, -1, "This is a PageTwo object", (40,40)) -class PageThree(wx.Panel): +class Results(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent) - t = wx.StaticText(self, -1, "This is a PageThree object", (60,60)) + class MainFrame(wx.Frame): @@ -30,14 +24,14 @@ class MainFrame(wx.Frame): nb = wx.Notebook(p) # create the page windows as children of the notebook - page1 = PageOne(nb) - page2 = PageTwo(nb) - page3 = PageThree(nb) + page1 = Ttheory(nb) + page2 = Labs(nb) + page3 = Results(nb) # add the pages to the notebook with the label to show on the tab - nb.AddPage(page1, "Page 1") - nb.AddPage(page2, "Page 2") - nb.AddPage(page3, "Page 3") + nb.AddPage(page1, "Теория") + nb.AddPage(page2, "Задание") + nb.AddPage(page3, "Отчёт") # finally, put the notebook in a sizer for the panel to manage # the layout