example2.py
来自「wxPython的基本示例程序」· Python 代码 · 共 22 行
PY
22 行
import wxfrom example1 import SketchWindowclass SketchFrame(wx.Frame): def __init__(self, parent): wx.Frame.__init__(self, parent, -1, "Sketch Frame", size=(800,600)) self.sketch = SketchWindow(self, -1) self.sketch.Bind(wx.EVT_MOTION, self.OnSketchMotion) self.statusbar = self.CreateStatusBar() def OnSketchMotion(self, event): self.statusbar.SetStatusText(str(event.GetPositionTuple())) event.Skip()if __name__ == '__main__': app = wx.PySimpleApp() frame = SketchFrame(None) frame.Show(True) app.MainLoop()
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?