projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow minimal acceptable row height/column width to be set to 0 for
[wxWidgets.git]
/
wxPython
/
demo
/
GridSimple.py
diff --git
a/wxPython/demo/GridSimple.py
b/wxPython/demo/GridSimple.py
index 89c2ec6e076ffbe2524c697153bc27f65594e84e..9075341a70958abb9998872f725b8922c3d0426c 100644
(file)
--- a/
wxPython/demo/GridSimple.py
+++ b/
wxPython/demo/GridSimple.py
@@
-36,6
+36,8
@@
class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin):
self.SetCellValue(6, 3, "You can veto editing this cell")
self.SetCellValue(6, 3, "You can veto editing this cell")
+ #self.SetRowLabelSize(0)
+ #self.SetColLabelSize(0)
# attribute objects let you keep a set of formatting values
# in one spot, and reuse them if needed
# attribute objects let you keep a set of formatting values
# in one spot, and reuse them if needed
@@
-64,6
+66,11
@@
class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin):
self.SetCellValue(11, 1, "This cell is set to span 3 rows and 3 columns");
self.SetCellValue(11, 1, "This cell is set to span 3 rows and 3 columns");
+ editor = wxGridCellTextEditor()
+ editor.SetParameters('10')
+ self.SetCellEditor(0, 4, editor)
+ self.SetCellValue(0, 4, "Limited text")
+
# test all the events
EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick)
# test all the events
EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick)
@@
-153,7
+160,7
@@
class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin):
# Show how to stay in a cell that has bad data. We can't just
# call SetGridCursor here since we are nested inside one so it
# Show how to stay in a cell that has bad data. We can't just
# call SetGridCursor here since we are nested inside one so it
- # won't have any effect. Instead, set coordina
nt
s to move to in
+ # won't have any effect. Instead, set coordina
te
s to move to in
# idle time.
value = self.GetCellValue(evt.GetRow(), evt.GetCol())
if value == 'no good':
# idle time.
value = self.GetCellValue(evt.GetRow(), evt.GetCol())
if value == 'no good':