]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/FontDialog.py
Warning fixes after char->wxChar in wxVariant.
[wxWidgets.git] / wxPython / demo / FontDialog.py
index 2135c491f156794063e839a1f820c094b91b057b..f5b9bcc9e7ff8ac77c0fb4d70918be46ff6a7976 100644 (file)
@@ -1,9 +1,6 @@
-# 11/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
-#
-# o Updated for wx namespace
-# 
 
 import  wx
+from wx.lib import stattext
 
 #---------------------------------------------------------------------------
 
@@ -15,9 +12,8 @@ class TestPanel(wx.Panel):
         btn = wx.Button(self, -1, "Select Font")
         self.Bind(wx.EVT_BUTTON, self.OnSelectFont, btn)
 
-        self.sampleText = wx.TextCtrl(self, -1, "Sample Text")
-        #from wxPython.lib.stattext import wxGenStaticText
-        #self.sampleText = wxGenStaticText(self, -1, "Sample Text")
+        self.sampleText = stattext.GenStaticText(self, -1, "Sample Text")
+        self.sampleText.SetBackgroundColour(wx.WHITE)
 
         self.curFont = self.sampleText.GetFont()
         self.curClr = wx.BLACK
@@ -75,6 +71,7 @@ class TestPanel(wx.Panel):
 
     def UpdateUI(self):
         self.sampleText.SetFont(self.curFont)
+        self.sampleText.SetForegroundColour(self.curClr)
         self.ps.SetLabel(str(self.curFont.GetPointSize()))
         self.family.SetLabel(self.curFont.GetFamilyString())
         self.style.SetLabel(self.curFont.GetStyleString())
@@ -140,5 +137,5 @@ to APPLY that information once you get it.
 if __name__ == '__main__':
     import sys,os
     import run
-    run.main(['', os.path.basename(sys.argv[0])])
+    run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])