self.rtc = rt.RichTextCtrl(self, style=wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER);
wx.CallAfter(self.rtc.SetFocus)
-
+ self.rtc.Freeze()
self.rtc.BeginSuppressUndo()
self.rtc.BeginParagraphSpacing(0, 20)
self.rtc.BeginLeftIndent(100, -40)
self.rtc.Newline()
- self.rtc.WriteText("It was in January, the most down-trodden month of an Edinburgh winteself.rtc. An attractive woman came into the cafe, which is nothing remarkable.")
+ self.rtc.WriteText("It was in January, the most down-trodden month of an Edinburgh winter. An attractive woman came into the cafe, which is nothing remarkable.")
self.rtc.EndLeftIndent()
self.rtc.Newline()
- self.rtc.WriteText("Numbered bullets are possible, again using subindents:")
+ self.rtc.WriteText("Numbered bullets are possible, again using sub-indents:")
self.rtc.BeginNumberedBullet(1, 100, 60)
self.rtc.Newline()
self.rtc.EndParagraphSpacing()
self.rtc.EndSuppressUndo()
-
+ self.rtc.Thaw()
+
def OnFileOpen(self, evt):
# TODO: Use RichTextBuffer.GetExtWildcard to get the wildcard string
# TODO: Use RichTextBuffer.GetExtWildcard to get the wildcard string
dlg = wx.FileDialog(self, "Choose a filename",
wildcard="All files (*.*)|*.*",
- style=wx.OPEN)
+ style=wx.SAVE)
if dlg.ShowModal() == wx.ID_OK:
path = dlg.GetPath()
if path:
self.rtc.SaveFile(path)
-
+ dlg.Destroy()
+
def OnFileViewHTML(self, evt): pass