X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/628c7f79d4f177b18349c9c10d49db6c9c4bc56c..52a5a0098a892c9568d2c3daaa99d83bc7d5e737:/wxPython/demo/wxXmlResourceHandler.py diff --git a/wxPython/demo/wxXmlResourceHandler.py b/wxPython/demo/wxXmlResourceHandler.py index 8091c8ba10..87d8598447 100644 --- a/wxPython/demo/wxXmlResourceHandler.py +++ b/wxPython/demo/wxXmlResourceHandler.py @@ -11,7 +11,7 @@ resourceText = r''' 200,100 - + 10,10 @@ -29,6 +29,7 @@ class MyBluePanel(wxPanel): # silly example. It could just as easily have been done in # the resource. self.SetBackgroundColour("BLUE") + self.SetForegroundColour("WHITE") # To do it the more complex way, (see below) we need to write the @@ -43,6 +44,8 @@ class PreMyBluePanel(wxPanel): def Create(self, parent, id, pos, size, style, name): wxPanel.Create(self, parent, id, pos, size, style, name) self.SetBackgroundColour("BLUE") + self.SetForegroundColour("WHITE") + #---------------------------------------------------------------------- @@ -77,7 +80,7 @@ class MyBluePanelXmlHandler(wxXmlResourceHandler): # instance, then you can make the handle much simpler. I'll # show both methods below. - if 0: + if 1: # The simple method assumes that there is no existing # instance. Be sure of that with an assert. assert self.GetInstance() is None @@ -150,7 +153,7 @@ class TestPanel(wxPanel): sizer.Add(panel, 1, wxEXPAND|wxALL, 5) self.SetSizer(sizer) - self.SetAutoLayout(true) + self.SetAutoLayout(True) #----------------------------------------------------------------------