dabo Commit
Revision 2744
Date: 2007-01-23 17:39:38 -0800 (Tue, 23 Jan 2007)
Author: Ed

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

Log:
Added word wrap support to columns when in edit mode. Previously, wrap only 
appeared when the cell was not being edited.


Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2007-01-24 01:20:13 UTC (rev 2743)
+++ trunk/dabo/ui/uiwx/dGrid.py 2007-01-24 01:39:38 UTC (rev 2744)
@@ -451,6 +451,7 @@
                self.floatRendererClass = wx.grid.GridCellFloatRenderer
                self.listRendererClass = wx.grid.GridCellStringRenderer
                self.stringEditorClass = wx.grid.GridCellTextEditor
+               self.wrapStringEditorClass = 
wx.grid.GridCellAutoWrapStringEditor
                self.boolEditorClass = wx.grid.GridCellBoolEditor
                self.intEditorClass = wx.grid.GridCellNumberEditor
                self.longEditorClass = wx.grid.GridCellNumberEditor
@@ -1296,8 +1297,10 @@
                        self._wordWrap = val
                        if val:
                                self.defaultRenderers["str"] = 
self.defaultRenderers["string"] = self.wrapStringRendererClass
+                               self.defaultEditors["str"] = 
self.defaultEditors["string"] = self.wrapStringEditorClass
                        else:
                                self.defaultRenderers["str"] = 
self.defaultRenderers["string"] = self.stringRendererClass
+                               self.defaultEditors["str"] = 
self.defaultEditors["string"] = self.stringEditorClass
                        self._refreshGrid()
                else:
                        self._properties["WordWrap"] = val
@@ -4285,13 +4288,13 @@
                                Searchable=False, Editable=True)
                self.addColumn(col)
 
-               col.CustomRenderers[1] = col.stringRendererClass
-               col.CustomEditors[1] = col.stringEditorClass
+#              col.CustomRenderers[1] = col.stringRendererClass
+#              col.CustomEditors[1] = col.stringEditorClass
                col.HeaderFontBold = False
 
                col = dColumn(self, Name="Person", Order=20, DataField="name",
                                DataType="string", Width=200, 
Caption="Celebrity Name",
-                               Sortable=True, Searchable=True, Editable=True, 
Expand=True)
+                               Sortable=True, Searchable=True, Editable=True, 
Expand=False)
                self.addColumn(col)
                
                col.HeaderFontItalic = True
@@ -4305,7 +4308,7 @@
 
                col = dColumn(self, Name="Color", Order=40, DataField="color",
                                DataType="string", Width=40, Caption="Favorite 
Color",
-                               Sortable=True, Searchable=True, Editable=True, 
Expand=True)
+                               Sortable=True, Searchable=True, Editable=True, 
Expand=False)
                self.addColumn(col)
 
                col.ListEditorChoices = dabo.dColors.colors




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to