This commit was manufactured by cvs2svn to create tag

'DEBIAN_2_4_3_1_SARGE_v_2_4_2_4'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/DEBIAN_2_4_3_1_SARGE_v_2_4_2_4@34395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2005-05-29 09:56:16 +00:00
parent 86118733af
commit cfd794784f
4010 changed files with 349688 additions and 169530 deletions

View File

@@ -3,6 +3,9 @@
from wxPython.wx import *
from wxScrolledWindow import MyCanvas
import images
SHOW_BACKGROUND = 1
#----------------------------------------------------------------------
class MyParentFrame(wxMDIParentFrame):
@@ -24,16 +27,38 @@ class MyParentFrame(wxMDIParentFrame):
EVT_MENU(self, 5000, self.OnNewWindow)
EVT_MENU(self, 5001, self.OnExit)
if SHOW_BACKGROUND:
self.bg_bmp = images.getGridBGBitmap()
EVT_ERASE_BACKGROUND(self.GetClientWindow(), self.OnEraseBackground)
def OnExit(self, evt):
self.Close(true)
self.Close(True)
def OnNewWindow(self, evt):
self.winCount = self.winCount + 1
win = wxMDIChildFrame(self, -1, "Child Window: %d" % self.winCount)
canvas = MyCanvas(win)
win.Show(true)
win.Show(True)
def OnEraseBackground(self, evt):
dc = evt.GetDC()
if not dc:
dc = wxClientDC(self.GetClientWindow())
# tile the background bitmap
sz = self.GetClientSize()
w = self.bg_bmp.GetWidth()
h = self.bg_bmp.GetHeight()
x = 0
while x < sz.width:
y = 0
while y < sz.height:
dc.DrawBitmap(self.bg_bmp, x, y)
y = y + h
x = x + w
#----------------------------------------------------------------------
@@ -43,9 +68,9 @@ if __name__ == '__main__':
def OnInit(self):
wxInitAllImageHandlers()
frame = MyParentFrame()
frame.Show(true)
frame.Show(True)
self.SetTopWindow(frame)
return true
return True
app = MyApp(0)