Ejemplo n.º 1
0
    def __init__(self, parent, ID, title):
        Frame.__init__(self, parent, ID, title, DefaultPosition, Size(300, 200))
        menu = Menu()
        menu.Append(ID_EXIT, "E&xit", "Terminate the program")
        menuBar = MenuBar()
        menuBar.Append(menu, "&File")
        self.SetMenuBar(menuBar)
        EVT_MENU(self, ID_EXIT, self.DoExit)

        # make sure reactor.stop() is used to stop event loop:
        EVT_CLOSE(self, lambda evt: reactor.stop())
Ejemplo n.º 2
0
    def __init__(self, parent, title, df):
        super(PandasTable, self).__init__(parent, title=title)
        panel = wx.Panel(self, -1)
        self.data = df
        grid = self.create_grid(panel, self.data)
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(grid, 1, wx.ALL|wx.EXPAND)
        panel.SetSizer(sizer)

        # Bind Close Event
        EVT_CLOSE(self, self.exit)
        self.Center()
        self.Show()
Ejemplo n.º 3
0
 def update_line(idleevent):
     if orderedVel == []:
         for timeStep in orderedStep:
             for step, vel in self.VelocityPlot.iteritems():
                 if timeStep == step:
                     orderedVel.append(vel)
         orderedVel.reverse()
         self.count += 1
     if self.count >= 2:
         self.count = 0
         EVT_CLOSE(GetApp(), update_line)
         close()
     line.set_ydata(orderedVel.pop())
     fig.canvas.draw_idle()