hi everery one I Need help on getting examles of how to create a toolbar with images using wxpython on a windows pc how can i add a toolbar to a GUI all sample codes i could find contain errors. i did the following but it is wrong! what is it with the IMAGES? do i have to create them, load them...? or they come with python like in Matlab thank you.
import wx from pylab import* class MainWindow(wx.Frame): def __init__(self,parent,id,title): self.dirname='' wx.Frame.__init__(self,parent,wx.ID_ANY, title,wx.DefaultPosition, wx.Size(320,410)) ##############_______________________ADDING A TOOLBAR___________________###################### toolbar = wx.ToolBar(self, -1, style=wx.TB_HORIZONTAL | wx.NO_BORDER) toolbar.AddSimpleTool(1, wx.Image('stock_new.png', wx.BITMAP_TYPE_PNG).ConvertToBitmap(), 'New', '') toolbar.Realize() Frame.Add(toolbar, 0, border=5) app = wx.PySimpleApp() frame = MainWindow(None, -1, " dipole antenna ") frame.show(1) frame.SetBackgroundColour('light grey') app.MainLoop() __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.espanol.yahoo.com/
-- http://mail.python.org/mailman/listinfo/python-list