dabo Commit
Revision 7023
Date: 2011-12-10 11:09:16 -0800 (Sat, 10 Dec 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/7023
Changed:
U trunk/dabo/ui/uiwx/dGrid.py
Log:
Added a setRowHeight() method to allow programmatic setting of row heights. If
SameSizeRows is True, setting any row height changes them all, just as if the
row had been resized in the UI.
Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2011-12-10 18:49:01 UTC (rev 7022)
+++ trunk/dabo/ui/uiwx/dGrid.py 2011-12-10 19:09:16 UTC (rev 7023)
@@ -3393,6 +3393,20 @@
return None
+ def setRowHeight(self, row, ht):
+ """Explicitly set the height of a specific row in the grid. If
+ SameSizeRows is True, all rows will be affected.
+ """
+ if self.SameSizeRows:
+ self.RowHeight = ht
+ else:
+ if row >= self.RowCount:
+ dabo.log.error(_("Specified row is out of range
for setRowHeight(). "
+ "Attempted: %s; max row: %s") %
(row, self.RowCount - 1))
+ return
+ self.SetRowSize(row, ht)
+
+
def _getWxHeader(self):
"""Return the wx grid header window."""
return self.GetGridColLabelWindow()
_______________________________________________
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]