- #self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, false))
-
- sizer = wxBoxSizer(wxVERTICAL)
- sizer.Add(wxStaticText(self, -1,
- "Copy/Paste text to/from\n"
- "this window and other apps"), 0, wxEXPAND|wxALL, 2)
-
- self.text = wxTextCtrl(self, -1, "", style=wxTE_MULTILINE|wxHSCROLL)
- sizer.Add(self.text, 1, wxEXPAND)
-
- hsz = wxBoxSizer(wxHORIZONTAL)
- hsz.Add(wxButton(self, 6050, " Copy "), 1, wxEXPAND|wxALL, 2)
- hsz.Add(wxButton(self, 6051, " Paste "), 1, wxEXPAND|wxALL, 2)
- sizer.Add(hsz, 0, wxEXPAND)
- sizer.Add(wxButton(self, 6052, " Copy Bitmap "), 0, wxEXPAND|wxALL, 2)
-
- EVT_BUTTON(self, 6050, self.OnCopy)
- EVT_BUTTON(self, 6051, self.OnPaste)
- EVT_BUTTON(self, 6052, self.OnCopyBitmap)
-
- self.SetAutoLayout(true)
+ #self.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD, False))
+
+ sizer = wx.BoxSizer(wx.VERTICAL)
+ sizer.Add(
+ wx.StaticText(
+ self, -1, "Copy/Paste text to/from\n"
+ "this window and other apps"
+ ),
+ 0, wx.EXPAND|wx.ALL, 2
+ )
+
+ self.text = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.HSCROLL)
+ sizer.Add(self.text, 1, wx.EXPAND)
+
+ hsz = wx.BoxSizer(wx.HORIZONTAL)
+ hsz.Add(wx.Button(self, ID_CopyBtn, " Copy "), 1, wx.EXPAND|wx.ALL, 2)
+ hsz.Add(wx.Button(self, ID_PasteBtn, " Paste "), 1, wx.EXPAND|wx.ALL, 2)
+ sizer.Add(hsz, 0, wx.EXPAND)
+ sizer.Add(
+ wx.Button(self, ID_BitmapBtn, " Copy Bitmap "),
+ 0, wx.EXPAND|wx.ALL, 2
+ )
+
+ self.Bind(wx.EVT_BUTTON, self.OnCopy, id=ID_CopyBtn)
+ self.Bind(wx.EVT_BUTTON, self.OnPaste, id=ID_PasteBtn)
+ self.Bind(wx.EVT_BUTTON, self.OnCopyBitmap, id=ID_BitmapBtn)
+
+ self.SetAutoLayout(True)