コード例 #1
0
    def openlistbox3OnButtonClick(self, event):
        print("tes3")

        from AppsSDS.TempListbox import TempListbox
        self.runList = TempListbox(self)
        self.runList.Show()
        event.Skip()
コード例 #2
0
class Page2(wx.Panel):
    def __init__(self,
                 parent,
                 id=wx.ID_ANY,
                 pos=wx.DefaultPosition,
                 size=wx.Size(500, 300),
                 style=wx.TAB_TRAVERSAL,
                 name=wx.EmptyString):
        wx.Panel.__init__(self,
                          parent,
                          id=id,
                          pos=pos,
                          size=size,
                          style=style,
                          name=name)

        bSizer10 = wx.BoxSizer(wx.VERTICAL)

        self.m_staticText7 = wx.StaticText(self, wx.ID_ANY,
                                           u"OCCUPATIONAL DAYDREAM",
                                           wx.DefaultPosition, wx.DefaultSize,
                                           0)
        self.m_staticText7.Wrap(-1)

        bSizer10.Add(self.m_staticText7, 0,
                     wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)

        fgSizer71 = wx.FlexGridSizer(0, 4, 0, 0)
        fgSizer71.AddGrowableCol(1)
        fgSizer71.SetFlexibleDirection(wx.BOTH)
        fgSizer71.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_staticText8 = wx.StaticText(self, wx.ID_ANY, u"1",
                                           wx.DefaultPosition, wx.DefaultSize,
                                           0)
        self.m_staticText8.Wrap(-1)

        fgSizer71.Add(
            self.m_staticText8, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_textCtrl7 = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString,
                                       wx.DefaultPosition, wx.Size(-1, -1), 0)
        fgSizer71.Add(self.m_textCtrl7, 0,
                      wx.ALL | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)

        self.openlistbox1 = wx.Button(self, wx.ID_ANY, u"Cari",
                                      wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer71.Add(
            self.openlistbox1, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.label_event = wx.StaticText(self, wx.ID_ANY, u"MyLabel",
                                         wx.DefaultPosition, wx.DefaultSize, 0)
        self.label_event.Wrap(-1)

        fgSizer71.Add(
            self.label_event, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_staticText10 = wx.StaticText(self, wx.ID_ANY, u"2",
                                            wx.DefaultPosition, wx.DefaultSize,
                                            0)
        self.m_staticText10.Wrap(-1)

        fgSizer71.Add(
            self.m_staticText10, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_textCtrl6 = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString,
                                       wx.DefaultPosition, wx.Size(-1, -1), 0)
        fgSizer71.Add(self.m_textCtrl6, 0,
                      wx.ALL | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)

        self.openlistbox2 = wx.Button(self, wx.ID_ANY, u"Cari",
                                      wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer71.Add(
            self.openlistbox2, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_staticText131 = wx.StaticText(self, wx.ID_ANY, u"MyLabel",
                                             wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.m_staticText131.Wrap(-1)

        fgSizer71.Add(
            self.m_staticText131, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_staticText132 = wx.StaticText(self, wx.ID_ANY, u"3",
                                             wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.m_staticText132.Wrap(-1)

        fgSizer71.Add(
            self.m_staticText132, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_textCtrl21 = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString,
                                        wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer71.Add(self.m_textCtrl21, 0,
                      wx.ALL | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)

        self.openlistbox3 = wx.Button(self, wx.ID_ANY, u"Cari",
                                      wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer71.Add(
            self.openlistbox3, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_staticText133 = wx.StaticText(self, wx.ID_ANY, u"MyLabel",
                                             wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.m_staticText133.Wrap(-1)

        fgSizer71.Add(
            self.m_staticText133, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_staticText134 = wx.StaticText(self, wx.ID_ANY, u"4",
                                             wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.m_staticText134.Wrap(-1)

        fgSizer71.Add(
            self.m_staticText134, 0,
            wx.ALL | wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.m_textCtrl20 = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString,
                                        wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer71.Add(self.m_textCtrl20, 0,
                      wx.ALL | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)

        self.openlistbox4 = wx.Button(self, wx.ID_ANY, u"Cari",
                                      wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer71.Add(
            self.openlistbox4, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_staticText137 = wx.StaticText(self, wx.ID_ANY, u"MyLabel",
                                             wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.m_staticText137.Wrap(-1)

        fgSizer71.Add(
            self.m_staticText137, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_staticText138 = wx.StaticText(self, wx.ID_ANY, u"5",
                                             wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.m_staticText138.Wrap(-1)

        fgSizer71.Add(
            self.m_staticText138, 0,
            wx.ALL | wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.m_textCtrl19 = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString,
                                        wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer71.Add(self.m_textCtrl19, 0,
                      wx.ALL | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)

        self.openlistbox5 = wx.Button(self, wx.ID_ANY, u"Cari",
                                      wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer71.Add(
            self.openlistbox5, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_staticText1381 = wx.StaticText(self, wx.ID_ANY, u"MyLabel",
                                              wx.DefaultPosition,
                                              wx.DefaultSize, 0)
        self.m_staticText1381.Wrap(-1)

        fgSizer71.Add(
            self.m_staticText1381, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_staticText139 = wx.StaticText(self, wx.ID_ANY, u"6",
                                             wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.m_staticText139.Wrap(-1)

        fgSizer71.Add(
            self.m_staticText139, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_textCtrl22 = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString,
                                        wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer71.Add(self.m_textCtrl22, 0,
                      wx.ALL | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)

        self.openlistbox6 = wx.Button(self, wx.ID_ANY, u"Cari",
                                      wx.DefaultPosition, wx.DefaultSize, 0)
        fgSizer71.Add(
            self.openlistbox6, 0,
            wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_staticText140 = wx.StaticText(self, wx.ID_ANY, u"MyLabel",
                                             wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.m_staticText140.Wrap(-1)

        fgSizer71.Add(
            self.m_staticText140, 0,
            wx.ALL | wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 5)

        bSizer10.Add(fgSizer71, 1, wx.EXPAND, 5)

        self.SetSizer(bSizer10)
        self.Layout()

        # Connect Events
        self.openlistbox1.Bind(wx.EVT_BUTTON, self.openlistbox1OnButtonClick)
        self.openlistbox2.Bind(wx.EVT_BUTTON, self.openlistbox2OnButtonClick)
        self.openlistbox3.Bind(wx.EVT_BUTTON, self.openlistbox3OnButtonClick)
        self.openlistbox4.Bind(wx.EVT_BUTTON, self.openlistbox4OnButtonClick)
        self.openlistbox5.Bind(wx.EVT_BUTTON, self.openlistbox5OnButtonClick)
        self.openlistbox6.Bind(wx.EVT_BUTTON, self.openlistbox6OnButtonClick)

    def __del__(self):
        pass

    # Virtual event handlers, overide them in your derived class
    def openlistbox1OnButtonClick(self, event):
        print("tes")
        from AppsSDS.TempListbox import TempListbox
        self.runList = TempListbox(self)
        self.runList.Show()

        event.Skip()

    def openlistbox2OnButtonClick(self, event):
        print("tes2")
        from AppsSDS.TempListbox import TempListbox
        self.runList = TempListbox(self)
        self.runList.Show()
        event.Skip()

    def openlistbox3OnButtonClick(self, event):
        print("tes3")

        from AppsSDS.TempListbox import TempListbox
        self.runList = TempListbox(self)
        self.runList.Show()
        event.Skip()

    def openlistbox4OnButtonClick(self, event):
        print("tes4")
        from AppsSDS.TempListbox import TempListbox
        self.runList = TempListbox(self)
        self.runList.Show()
        event.Skip()

    def openlistbox5OnButtonClick(self, event):
        print("tes5")
        from AppsSDS.TempListbox import TempListbox
        self.runList = TempListbox(self)
        self.runList.Show()
        event.Skip()

    def openlistbox6OnButtonClick(self, event):
        print("tes6")
        from AppsSDS.TempListbox import TempListbox
        self.runList = TempListbox(self)
        self.runList.Show()
        event.Skip()