- "then Ctrl-Drag it to the lower \n"
- "window or to another application\n"
- "that accepts BMP's as a drop target.\n\n"
- "The lower window is accepting a\n"
- "custom data type that is a pickled\n"
- "Python list of lines data.")
- sizer.Add(text, 1, wxALL, 10)
-
- insizer = wxBoxSizer(wxVERTICAL)
- insizer.Add(DoodlePad(self, log), 1, wxEXPAND|wxALL, 5)
- insizer.Add(DoodleViewer(self, log), 1, wxEXPAND|wxALL, 5)
-
- sizer.Add(insizer, 1, wxEXPAND)
- self.SetAutoLayout(true)
+ "then switch the mode below and drag the\n"
+ "picture to the lower window or to another\n"
+ "application that accepts BMP's as a drop\n"
+ "target.\n"
+ )
+
+ rb1 = wx.RadioButton(self, -1, "Draw", style=wx.RB_GROUP)
+ rb1.SetValue(True)
+ rb2 = wx.RadioButton(self, -1, "Drag")
+ rb2.SetValue(False)
+
+ text2 = wx.StaticText(self, -1,
+ "The lower window is accepting a\n"
+ "custom data type that is a pickled\n"
+ "Python list of lines data.")
+
+ self.pad = DoodlePad(self, log)
+ view = DoodleViewer(self, log)
+
+ # put them in sizers
+ sizer = wx.BoxSizer(wx.HORIZONTAL)
+ box = wx.BoxSizer(wx.VERTICAL)
+ rbox = wx.BoxSizer(wx.HORIZONTAL)
+
+ rbox.Add(rb1)
+ rbox.Add(rb2)
+ box.Add(text1, 0, wx.ALL, 10)
+ box.Add(rbox, 0, wx.ALIGN_CENTER)
+ box.Add((10,90))
+ box.Add(text2, 0, wx.ALL, 10)
+
+ sizer.Add(box)
+
+ dndsizer = wx.BoxSizer(wx.VERTICAL)
+ dndsizer.Add(self.pad, 1, wx.EXPAND|wx.ALL, 5)
+ dndsizer.Add(view, 1, wx.EXPAND|wx.ALL, 5)
+
+ sizer.Add(dndsizer, 1, wx.EXPAND)
+
+ self.SetAutoLayout(True)