hola denuevo tengo un error en mi archivo, dice...
Traceback (most recent last call):
File"C:\python25\Toolbox.py",line72, in <module>
Tools(None, -1, "Toolbox")
TypeError:__init__() takes exactly 5 arguments (4given)
Código python:
Ver originalimport wx
class Tools(wx.Frame):
def __init__(self, parent, id, title, style):
wx.Frame.__init__(self, parent, -1, title, style=wx.CAPTION|wx.CLOSE_BOX|wx.MINIMIZE_BOX|wx.MAXIMIZE_BOX|wx.SYSTEM_MENU|wx.RESIZE_BORDER|wx.FRAME_TOOL_WINDOW|wx.CLIP_CHILDREN
)
bitbotn1 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn2 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn3 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn4 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn5 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn6 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn7 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn8 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn11 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn12 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn13 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn14 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn15 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn16 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn17 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn18 = wx.BitmapButton(self, -1, wx.Bitmap("icns\buscar.png", wx.BITMAP_ANY))
bitbotn1.SetSize(bitbtn1.GetBestSize())
bitbotn2.SetSize(bitbtn2.GetBestSize())
bitbotn3.SetSize(bitbtn3.GetBestSize())
bitbotn4.SetSize(bitbtn4.GetBestSize())
bitbotn5.SetSize(bitbtn5.GetBestSize())
bitbotn6.SetSize(bitbtn6.GetBestSize())
bitbotn7.SetSize(bitbtn7.GetBestSize())
bitbotn8.SetSize(bitbtn8.GetBestSize())
bitbotn11.SetSize(bitbtn11.GetBestSize())
bitbotn12.SetSize(bitbtn12.GetBestSize())
bitbotn13.SetSize(bitbtn13.GetBestSize())
bitbotn14.SetSize(bitbtn14.GetBestSize())
bitbotn15.SetSize(bitbtn15.GetBestSize())
bitbotn16.SetSize(bitbtn16.GetBestSize())
bitbotn17.SetSize(bitbtn17.GetBestSize())
bitbotn18.SetSize(bitbtn18.GetBestSize())
sizer = wx.BoxSizer(wx.VERTICAL)
gsizer = wx.GridSizer(8, 2, 0, 0)
gsizer.Add(bitbotn1, 0, 0, 0)
gsizer.Add(bitbotn2, 0, 0, 0)
gsizer.Add(bitbotn3, 0, 0, 0)
gsizer.Add(bitbotn4, 0, 0, 0)
gsizer.Add(bitbotn5, 0, 0, 0)
gsizer.Add(bitbotn6, 0, 0, 0)
gsizer.Add(bitbotn7, 0, 0, 0)
gsizer.Add(bitbotn8, 0, 0, 0)
gsizer.Add(bitbotn11, 0, 0, 0)
gsizer.Add(bitbotn12, 0, 0, 0)
gsizer.Add(bitbotn13, 0, 0, 0)
gsizer.Add(bitbotn14, 0, 0, 0)
gsizer.Add(bitbotn15, 0, 0, 0)
gsizer.Add(bitbotn16, 0, 0, 0)
gsizer.Add(bitbotn17, 0, 0, 0)
gsizer.Add(bitbotn18, 0, 0, 0)
sizer.Add(gsizer, 1, wx.EXPAND, 0)
self.SetSizer(sizer)
sizer.Fit(self)
self.Show(True)
app = wx.App()
Tools(None, -1, "Toolbox")
app.MainLoop()
no se que otro argumento tenga que ir