dabo Commit
Revision 6812
Date: 2011-08-31 00:09:47 -0700 (Wed, 31 Aug 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6812

Changed:
U   trunk/dabo/ui/uiwx/dGrid.py

Log:
Fix setting grid cell font attributes issue.

Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2011-08-31 01:17:02 UTC (rev 6811)
+++ trunk/dabo/ui/uiwx/dGrid.py 2011-08-31 07:09:47 UTC (rev 6812)
@@ -793,21 +793,16 @@
                        row = getattr(self, "_cellDynamicRow", 
self.Parent.CurrentRow)
                except dabo.ui.deadObjectException:
                        # @dabo.ui.deadCheck didn't seem to work...
-                       return 
+                       return
                cellAttr = obj = self._gridCellAttrs.get(row, 
self._gridColAttr.Clone())
                if "." in wxPropName:
                        # For instance, Font.SetWeight
-                       subObject, wxPropName = wxPropName.split(".")
-                       obj = getattr(cellAttr, subObject)
-               getattr(obj, wxPropName)(*args, **kwargs)
-
-               ## pkm 2010-11-30 : Tried to add CellFontBold, but it doesn't 
show visually in the
-               ##                  grid no matter what I try. Commented code 
below shows what I
-               ##                  attempted:
-               #cellAttr.Font = wx.Font(cellAttr.Font.PointSize, 
cellAttr.Font.Family,
-               #               cellAttr.Font.Style, cellAttr.Font.Weight, 
cellAttr.Font.Underlined,
-               #               cellAttr.Font.FaceName)
-               #cellAttr = cellAttr.Clone()
+                       wxPropName, subObject = wxPropName.split(".")
+                       obj = getattr(cellAttr, wxPropName)
+                       getattr(obj, subObject)(*args, **kwargs)
+                       setattr(cellAttr, wxPropName, obj)
+               else:
+                       getattr(cellAttr, wxPropName)(*args, **kwargs)
                self._gridCellAttrs[row] = cellAttr
 
 



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to