• 2021-04-14
    试试理解这个小程序。请选择合适的代码使得如下的程序能够实现在程序Frame中按下鼠标左键时,在鼠标按下的位置出现一个Button,如下图所示。http://edu-image.nosdn.127.net/6F9E2960D773BA3D7598270EA2E5C44B.jpg?imageView&thumbnail=890x0&quality=100import wxclass MyFrame(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, ____, title = title) self.panel = wx.Panel(self) self.____(wx.EVT_LEFT_UP, self.OnClick) self.Show(True) def OnClick(self, event): posm = event.GetPosition() wx._____(_____, label = Hi~~~, pos = (posm.x, posm.y))if __name__ == __main__: app = wx.App() frame = MyFrame(None, Hello Python) app.MainLoop()