#encoding: utf-8
importwximportosimportnonameclassFrame( noname.MyFrame1 ):def __init__(self,parent):
noname.MyFrame1.__init__(self,parent)
self.curBitmap=None
self.curBitmapPostion=None
self.curPointerPos=Nonedefm_createBitmap_buttonOnButtonClick ( self,event ):
event.Skip()defm_bitmap1OnLeftDown ( self,event ):
self.curBitmapPostion=self.m_bitmap1.GetPosition()
self.curPointerPos=event.GetPosition()
event.Skip()defm_bitmap1OnMotion ( self,event ):if event.Dragging() andevent.LeftIsDown() :
pos= event.GetPosition() -self.curPointerPos
self.curBitmapPostion+=pos
statusVal= ‘X = %d Y = %d‘ %(self.curBitmapPostion.x,self.curBitmapPostion.y)