def change_grid_shape(self, shape):
        """Grid shape change event handler, marks content as changed"""

        # Mark content as changed
        post_command_event(self.main_window, self.ContentChangedMsg)

        self.code_array.shape = shape

        # Update TableChoiceIntCtrl
        post_command_event(self.main_window, self.ResizeGridMsg, shape=shape)

        # Change grid table dimensions
        self.grid.GetTable().ResetView()

        # Clear caches
        self.code_array.result_cache.clear()
def change_grid_shape ( self , shape ) : post_command_event ( self . main_window , self . ContentChangedMsg ) self . code_array . shape = shape post_command_event ( self . main_window , self . ResizeGridMsg , shape = shape ) self . grid . GetTable ( ) . ResetView ( ) self . code_array . result_cache . clear ( )
Grid shape change event handler, marks content as changed