All pastes #612605 Raw Edit

Someone

public python v1 · immutable
·published 2007-07-10 14:36 UTC
rendered paste body
import wxclass MainWindow(wx.Frame):    """ We simply derive a new class of Frame. """    def __init__(self, parent, id, title):        wx.Frame.__init__(self, parent, id, title, size=(640,480))        self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)                self.control = wx.TextCtrl(self, 1, style=wx.TE_MULTILINE)        self.CreateStatusBar()        self.Show(True)        def OnKeyDown(self, event):        if event.GetKeyCode() == wx.WXK_CONTROL:            self.control.AppendText('control')app = wx.PySimpleApp()frame=MainWindow(None, wx.ID_ANY, 'Small editor')app.MainLoop()