Button above exists properly!!!
This commit is contained in:
parent
6997899788
commit
870a4559f8
@ -2,33 +2,25 @@ import glob
|
||||
import wx
|
||||
|
||||
|
||||
class Example(wx.Frame):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(Example, self).__init__(*args, **kwargs)
|
||||
self.InitUI()
|
||||
|
||||
def InitUI(self):
|
||||
vbox = wx.BoxSizer(wx.VERTICAL)
|
||||
toolbar1 = wx.ToolBar(self)
|
||||
toolbar1.AddTool(wx.ID_ANY, '', wx.Bitmap('pigeonLOGO.png'))
|
||||
toolbar1.Realize()
|
||||
vbox.Add(toolbar1, 0, wx.EXPAND)
|
||||
self.Bind(wx.EVT_TOOL, self.OnQuit)
|
||||
|
||||
self.SetSizer(vbox)
|
||||
|
||||
self.SetSize((350, 250))
|
||||
self.Centre()
|
||||
|
||||
def OnQuit(self, e):
|
||||
self.Close()
|
||||
|
||||
|
||||
class ServerPanel(wx.Panel):
|
||||
def __init__(self, parent):
|
||||
super().__init__(parent)
|
||||
main_sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
toolbar1 = wx.ToolBar(self)
|
||||
toolbar1.AddTool(wx.ID_ANY, '', wx.Bitmap('pigeonLOGO.png'))
|
||||
toolbar1.Realize()
|
||||
main_sizer.Add(toolbar1, 0, wx.EXPAND)
|
||||
self.Bind(wx.EVT_TOOL, self.OnQuit)
|
||||
|
||||
self.SetSizer(main_sizer)
|
||||
|
||||
self.SetSize((350, 250))
|
||||
self.Centre()
|
||||
|
||||
self.row_obj_dict = {}
|
||||
|
||||
self.list_ctrl = wx.ListCtrl(
|
||||
@ -65,6 +57,9 @@ class ServerPanel(wx.Panel):
|
||||
main_sizer.Add(start_button, 0, wx.ALL | 100, 5)
|
||||
main_sizer.Add(stop_button, 0, wx.ALL | 100, 5)
|
||||
self.SetSizer(main_sizer)
|
||||
|
||||
def OnQuit(self, e):
|
||||
self.Close()
|
||||
|
||||
def on_edit(self, event):
|
||||
print('in on_edit')
|
||||
@ -76,13 +71,12 @@ class ServerFrame(wx.Frame):
|
||||
def __init__(self):
|
||||
super().__init__(parent=None,
|
||||
title='Server Dashboard')
|
||||
|
||||
self.panel = ServerPanel(self)
|
||||
self.frame = Example(self)
|
||||
self.Show()
|
||||
|
||||
if __name__ == '__main__':
|
||||
app = wx.App(False)
|
||||
frame = ServerFrame()
|
||||
ex = Example(None)
|
||||
ex.Show()
|
||||
|
||||
app.MainLoop()
|
Loading…
x
Reference in New Issue
Block a user