Código python:
Ver original
import wx class frame(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title) menubar = wx.MenuBar() me_a = wx.Menu() me_a.Append(10, "Salir", "Item_menu") menubar.Append(me_a, "&Archivo") self.SetMenuBar(menubar) self.CreateStatusBar() tool = wx.ToolBar(self, -1) tool.AddLabelTool(10, "", wx.Bitmap("iconos/view_text.ico")) tool.AddLabelTool(20, "code", wx.Bitmap("iconos/view_sidetree.ico")) tool.AddLabelTool(30, "", wx.Bitmap("iconos/view_remove.ico")) tool.Realize() self.pnl = wx.Window(self, -1) box = wx.BoxSizer(wx.VERTICAL) box.Add(tool, 0, wx.EXPAND) box.Add(self.pnl, 1, wx.EXPAND) self.SetSizer(box) self.Bind(wx.EVT_TOOL, self.OnSurce, id=10) self.Bind(wx.EVT_TOOL, self.OnDesign, id=20) def OnSurce(self, event): self.pan = wx.Panel(self.pnl, -1, style= wx.TextCtrl(self.pnl, style=wx.TE_MULTILINE)) def OnDesign(self, event): self.pl = wx.Panel(self.pnl, -1) app = wx.App() frame(None, -1, "Toolbar").Show() app.MainLoop()
espero que me puedan ayudar