X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b97ff8ed661f63c481fefb79b9708ad5d0749342..72fdc4585e28cb7ad84d6bc48292b4bd233d5846:/wxPython/demo/RichTextCtrl.py diff --git a/wxPython/demo/RichTextCtrl.py b/wxPython/demo/RichTextCtrl.py index f9ceffd447..a31dfb4184 100644 --- a/wxPython/demo/RichTextCtrl.py +++ b/wxPython/demo/RichTextCtrl.py @@ -17,7 +17,7 @@ class RichTextFrame(wx.Frame): 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) @@ -172,7 +172,8 @@ class RichTextFrame(wx.Frame): self.rtc.EndParagraphSpacing() self.rtc.EndSuppressUndo() - + self.rtc.Thaw() + def OnFileOpen(self, evt): # TODO: Use RichTextBuffer.GetExtWildcard to get the wildcard string @@ -197,12 +198,13 @@ class RichTextFrame(wx.Frame): # 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