Use wxBufferedDC in the doodle sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -35,7 +35,8 @@ class DoodleFrame(wxFrame):
|
||||
"""
|
||||
title = "Do a doodle"
|
||||
def __init__(self, parent):
|
||||
wxFrame.__init__(self, parent, -1, self.title, size=(800,600))
|
||||
wxFrame.__init__(self, parent, -1, self.title, size=(800,600),
|
||||
style=wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE)
|
||||
self.CreateStatusBar()
|
||||
self.MakeMenu()
|
||||
self.filename = None
|
||||
@@ -55,6 +56,13 @@ class DoodleFrame(wxFrame):
|
||||
self.SetAutoLayout(true)
|
||||
self.SetSizer(box)
|
||||
|
||||
EVT_CLOSE(self, self.OnCloseWindow)
|
||||
|
||||
|
||||
def OnCloseWindow(self, event):
|
||||
self.doodle.Cleanup()
|
||||
self.Destroy()
|
||||
|
||||
|
||||
def SaveFile(self):
|
||||
if self.filename:
|
||||
|
Reference in New Issue
Block a user