]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/XRCed/params.py
Allow art provider IDs for the extra bitmaps in a wxBitmapButton. (The
[wxWidgets.git] / wxPython / wx / tools / XRCed / params.py
index 07094c545a8b199b7f389913cdae0f34eb58685a..442c9c22570c52be8c2acb02dc46c754347aeb7f 100644 (file)
@@ -187,7 +187,6 @@ class ParamExStyle(ParamBinaryOr):
         else:
             self.values = []
         ParamBinaryOr.__init__(self, parent, name)
-        self.SetTitle('Extended window styles')
 
 class ParamColour(PPanel):
     def __init__(self, parent, name):
@@ -212,8 +211,11 @@ class ParamColour(PPanel):
         self.freeze = True
         if not value: value = '#FFFFFF'
         self.text.SetValue(str(value))  # update text ctrl
-        colour = wxColour(int(value[1:3], 16), int(value[3:5], 16), int(value[5:7], 16))
-        self.button.SetBackgroundColour(colour)
+        try:
+            colour = wxColour(int(value[1:3], 16), int(value[3:5], 16), int(value[5:7], 16))
+            self.button.SetBackgroundColour(colour)
+        except:                         # ignore errors
+            pass
         self.button.Refresh()
         self.freeze = False
     def OnPaintButton(self, evt):
@@ -234,7 +236,7 @@ class ParamColour(PPanel):
 
 ################################################################################
 
-# Mapping from wx constants ro XML strings
+# Mapping from wx constants to XML strings
 fontFamiliesWx2Xml = {wxDEFAULT: 'default', wxDECORATIVE: 'decorative',
                 wxROMAN: 'roman', wxSCRIPT: 'script', wxSWISS: 'swiss',
                 wxMODERN: 'modern'}