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:
Robin Dunn
2002-04-13 00:39:12 +00:00
parent aae032a0a9
commit 9de06a7953
2 changed files with 78 additions and 16 deletions

View File

@@ -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: