I can't get MiniFrames to work and I really have no idea how to. I'm a complete noob when it comes to wxPython as I just started learning today.
Heres the code for my GUI so far and I want to add a mini frame as a vertical toolbar along the side.
import wx
class MainWindow(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,wx.ID_ANY, title, size = (800,600))
# Creating the menubar. ########################
menuBar = wx.MenuBar()
# File Menu
filemenu = wx.Menu()
filemenu.Append(1, "New")
filemenu.Append(2, "Open")
filemenu.Append(3, "Save")
filemenu.Append(4, "Save As")
filemenu.AppendSeparator()
filemenu.Append(5, "Publish Website")
filemenu.AppendSeparator()
filemenu.Append(6, "Exit")
menuBar.Append(filemenu,"File")
self.SetMenuBar(menuBar)
self.Show(True)
# Edit Menu
editmenu = wx.Menu()
editmenu.Append(7, "Undo")
editmenu.Append(8, "Redo")
editmenu.Append(9, "Copy")
editmenu.AppendSeparator()
editmenu.Append(10, "Paste")
editmenu.Append(11, "Cut")
menuBar.Append(editmenu, "Edit")
self.SetMenuBar(menuBar)
self.Show(True)
# View Menu
viewmenu = wx.Menu()
viewmenu.AppendCheckItem(12, "Full Screen")
viewmenu.Append(13, "Zoom In")
viewmenu.Append(14, "Zoom Out")
menuBar.Append(viewmenu, "View")
self.SetMenuBar(menuBar)
self.Show(True)
# Help Menu
helpmenu = wx.Menu()
helpmenu.Append(15, "Help Contents")
helpmenu.Append(16, "About..")
menuBar.Append(helpmenu, "Help")
self.SetMenuBar(menuBar)
self.Show(True)
tb = self.CreateToolBar()
tsize = (16,16)
imageFile = "images/new.png"
image0 = wx.Image(imageFile, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
new_bmp = image0
imageFile = "images/open.png"
image1 = wx.Image(imageFile, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
open_bmp = image1
imageFile = "images/save.png"
image2 = wx.Image(imageFile, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
save_bmp = image2
imageFile = "images/copy.png"
image3 = wx.Image(imageFile, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
copy_bmp = image3
imageFile = "images/paste.png"
image4 = wx.Image(imageFile, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
paste_bmp = image4
cut_bmp = wx.ArtProvider.GetBitmap(wx.ART_CUT, wx.ART_TOOLBAR, tsize)
imageFile = "images/undo.png"
image6 = wx.Image(imageFile, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
undo_bmp = image6
imageFile = "images/redo.png"
image7 = wx.Image(imageFile, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
redo_bmp = image7
imageFile = "images/publish.png"
image8 = wx.Image(imageFile, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
build_bmp = image8
tb.AddLabelTool(10, "New", new_bmp, shortHelp="New", longHelp="Long help for 'New'")
tb.AddLabelTool(11, "Open", open_bmp, shortHelp="Open", longHelp="Long help for 'Open'")
tb.AddLabelTool(12, "Save", save_bmp, shortHelp="Save", longHelp="Long help for 'Save'")
tb.AddSeparator()
tb.AddLabelTool(13, "Copy", copy_bmp, shortHelp="Copy", longHelp="Long help for 'Copy'")
tb.AddLabelTool(14, "Paste", paste_bmp, shortHelp="Paste", longHelp="Long help for 'Paste'")
tb.AddLabelTool(15, "Cut", cut_bmp, shortHelp="Cut", longHelp="Long help for 'Cut'")
tb.AddLabelTool(16, "Undo", undo_bmp, shortHelp="Undo", longHelp="Long help for 'Undo'")
tb.AddLabelTool(17, "Redo", redo_bmp, shortHelp="redo", longHelp="Long help for 'redo'")
tb.AddSeparator()
tb.AddLabelTool(18, "Build", build_bmp, shortHelp="Build", longHelp="Long help for 'Build'")
tb.Realize()
mf = wx.MiniFrame()
app = wx.PySimpleApp()
frame = MainWindow(None, -1, "GUI")
app.MainLoop()