@@ -146,11 +146,16 @@ def _set_cells(self):
146146 CellRenderer (col_size , max_col_size , auto_col_size , word_wrap ))
147147 self .SetRowLabelSize (wx .grid .GRID_AUTOSIZE )
148148 self .SetColLabelSize (0 )
149- self .SetDefaultColSize (wx .grid .GRID_AUTOSIZE , resizeExistingCols = True )
149+ if not auto_col_size and not word_wrap :
150+ self .SetDefaultColSize (col_size , resizeExistingCols = True )
151+ else :
152+ self .SetDefaultColSize (wx .grid .GRID_AUTOSIZE , resizeExistingCols = True )
153+
150154 if auto_col_size :
151155 self .Bind (grid .EVT_GRID_CMD_COL_SIZE , self .OnCellColSizeChanged )
152156 else :
153157 self .Unbind (grid .EVT_GRID_CMD_COL_SIZE )
158+
154159 if word_wrap :
155160 self .SetDefaultRowSize (wx .grid .GRID_AUTOSIZE )
156161 self .SetDefaultCellOverflow (False ) # DEBUG
@@ -558,13 +563,14 @@ def OnKeyDown(self, event):
558563 event .Skip ()
559564 elif event .AltDown () and keycode == wx .WXK_RETURN :
560565 self ._move_cursor_down (event )
561- event .Skip ()
566+ # event.Skip()
562567 elif keycode == wx .WXK_WINDOWS_MENU :
563568 self .OnCellRightClick (event )
564569 elif keycode in [wx .WXK_RETURN , wx .WXK_BACK ]:
565570 if _iscelleditcontrolshown :
566571 self .save ()
567- event .Skip ()
572+ self ._move_grid_cursor (event , keycode )
573+ # event.Skip()
568574 elif (control_down or event .AltDown ()) and \
569575 keycode == wx .WXK_SPACE : # Avoid Mac CMD
570576 self ._open_cell_editor_with_content_assist ()
0 commit comments