toolbar icon trial DOESNT WORK AHA fml
This commit is contained in:
		@@ -1,7 +1,31 @@
 | 
			
		||||
import glob
 | 
			
		||||
import wx
 | 
			
		||||
 | 
			
		||||
class ServerPanel(wx.Panel):    
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
@@ -23,6 +47,7 @@ class ServerPanel(wx.Panel):
 | 
			
		||||
        self.list_ctrl.InsertColumn(9, 'Duration', width=140)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        ## To add checkboxes for whether or not something is blocked
 | 
			
		||||
        ##idx = 0
 | 
			
		||||
        ##for i in varNameForBlock:
 | 
			
		||||
@@ -52,9 +77,12 @@ class ServerFrame(wx.Frame):
 | 
			
		||||
        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()
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								pigeonLOGO.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								pigeonLOGO.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 28 KiB  | 
		Reference in New Issue
	
	Block a user