Wrap the setting of the initial content and formatting in Freeze/Thaw
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,7 +17,7 @@ class RichTextFrame(wx.Frame):
|
|||||||
self.rtc = rt.RichTextCtrl(self, style=wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER);
|
self.rtc = rt.RichTextCtrl(self, style=wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER);
|
||||||
wx.CallAfter(self.rtc.SetFocus)
|
wx.CallAfter(self.rtc.SetFocus)
|
||||||
|
|
||||||
|
self.rtc.Freeze()
|
||||||
self.rtc.BeginSuppressUndo()
|
self.rtc.BeginSuppressUndo()
|
||||||
|
|
||||||
self.rtc.BeginParagraphSpacing(0, 20)
|
self.rtc.BeginParagraphSpacing(0, 20)
|
||||||
@@ -172,6 +172,7 @@ class RichTextFrame(wx.Frame):
|
|||||||
self.rtc.EndParagraphSpacing()
|
self.rtc.EndParagraphSpacing()
|
||||||
|
|
||||||
self.rtc.EndSuppressUndo()
|
self.rtc.EndSuppressUndo()
|
||||||
|
self.rtc.Thaw()
|
||||||
|
|
||||||
|
|
||||||
def OnFileOpen(self, evt):
|
def OnFileOpen(self, evt):
|
||||||
|
Reference in New Issue
Block a user