# coding:utf-8
#Boa:Frame:Frame1
import wx
def create(parent):
return Frame1(parent)
[wxID_FRAME1, wxID_FRAME1BUTTON1, wxID_FRAME1BUTTON2, wxID_FRAME1BUTTON3,
wxID_FRAME1SCROLLEDWINDOW1, wxID_FRAME1TEXTCTRL1,
] = [wx.NewId() for _init_ctrls in range(6)]
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(480, 275), size=wx.Size(1280, 733),
style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
self.SetClientSize(wx.Size(1280, 733))
self.scrolledWindow1 = wx.ScrolledWindow(id=wxID_FRAME1SCROLLEDWINDOW1,
name='scrolledWindow1', parent=self, pos=wx.Point(0, 0),
size=wx.Size(1280, 733), style=wx.HSCROLL | wx.VSCROLL)
x, y = 40, 40
self.button1 = wx.Button(id=wxID_FRAME1BUTTON1, label='button1',
name='', parent=self.scrolledWindow1, pos=wx.Point(x, y),
size=wx.Size(10, 10), style=0)
self.button1.SetBackgroundColour(wx.Colour(255, 0, 0))
self.scrolledWindow1.Bind(wx.EVT_MOTION, self.OnMove)
self.button1.Bind(wx.EVT_MOTION, self.OnMove)
self.button2 = wx.Button(id=wxID_FRAME1BUTTON2, label='button2',
name='button2', parent=self.scrolledWindow1, pos=wx.Point(696,
176), size=wx.Size(10, 10), style=0)
self.button2.SetBackgroundColour(wx.Colour(255, 0, 0))
self.button3 = wx.Button(id=wxID_FRAME1BUTTON3, label='button3',
name='button3', parent=self.scrolledWindow1, pos=wx.Point(480,
176), size=wx.Size(10, 10), style=0)
self.button3.SetBackgroundColour(wx.Colour(255, 0, 0))
self.textCtrl1 = wx.TextCtrl(id=wxID_FRAME1TEXTCTRL1, name='textCtrl1',
parent=self.scrolledWindow1, pos=wx.Point(784, 256),
size=wx.Size(80, 23), style=0, value='textCtrl1')
def OnMove(self, event):
pos = event.GetPosition()
x, y = pos
self.textCtrl1.SetValue("%s, %s" % (pos.x, pos.y))
self.Refresh()
def __init__(self, parent):
self._init_ctrls(parent)
if __name__ == '__main__':
app = wx.PySimpleApp()
wx.InitAllImageHandlers()
frame = create(None)
frame.Show()
app.MainLoop()