You need to close your tag with
[/code] not [/python]
import wx
def create(parent):
return Frame1(parent)
[wxID_FRAME1, wxID_FRAME1BITMAPBUTTON1, wxID_FRAME1BITMAPBUTTON2,
wxID_FRAME1PANEL1, wxID_FRAME1PANEL2,
] = [wx.NewId() for _init_ctrls in range(5)]
class Frame1(wx.Frame):
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
pos=wx.Point(353, 258), size=wx.Size(773, 542),
style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
self.SetClientSize(wx.Size(765, 515))
self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self,
pos=wx.Point(40, 24), size=wx.Size(96, 104),
style=wx.TAB_TRAVERSAL)
self.panel2 = wx.Panel(id=wxID_FRAME1PANEL2, name='panel2', parent=self,
pos=wx.Point(216, 80), size=wx.Size(408, 200),
style=wx.SIMPLE_BORDER)
self.bitmapButton1 = wx.BitmapButton(bitmap= wx.Bitmap(u'tai.bmp',wx.BITMAP_TYPE_BMP),
id=wxID_FRAME1BITMAPBUTTON1, name='bitmapButton1',
parent=self.panel1, pos=wx.Point(16, 8), size=wx.Size(48, 24),
style=wx.BU_AUTODRAW)
self.bitmapButton1.Bind(wx.EVT_BUTTON, self.OnBitmapButton1Button,
id=wxID_FRAME1BITMAPBUTTON1)
self.bitmapButton2 = wx.BitmapButton(bitmap= wx.Bitmap(u'bau.bmp',wx.BITMAP_TYPE_BMP),
id=wxID_FRAME1BITMAPBUTTON2, name='bitmapButton2',
parent=self.panel1, pos=wx.Point(16, 56), size=wx.Size(48, 24),
style=wx.BU_AUTODRAW)
self.bitmapButton2.Bind(wx.EVT_BUTTON, self.OnBitmapButton2Button,
id=wxID_FRAME1BITMAPBUTTON2)
self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp)
self.Bind(wx.EVT_MOTION, self.OnMotion)
self.Bind(wx.EVT_PAINT, self.OnPaint)
self.pos = wx.Point(0,0)
def __init__(self, parent):
self._init_ctrls(parent)
def OnBitmapButton1Button(self,event):
pass
def OnBitmapButton2Button(self,event):
pass
def OnLeftDown(self, event):
pass
def OnLeftUp(self, event):
pass
def OnMotion(self, event):
pass
def OnPaint(self, event):
pass