:py:mod:`wolfhece.CpGrid` ========================= .. py:module:: wolfhece.CpGrid Module Contents --------------- .. py:class:: CpGrid(parent, id, style) Bases: :py:obj:`wx.grid.Grid` .. autoapi-inheritance-diagram:: wolfhece.CpGrid.CpGrid :parts: 1 :private-bases: A Full Copy and Paste enabled grid class which implements Excel like copy, paste, and delete functionality. - Ctrl+c : Copy range of selected cells. - Ctrl+v : Paste copy selection at point of currently selected cell. - If paste selection is larger than copy selection, copy selection will be replicated to fill paste region if it is a modulo number of copy rows and/or columns, otherwise just the copy selection will be pasted. - Ctrl+x : Delete current selection. - Deleted selection can be restored with Ctrl+z, or pasted with Ctrl+v. - Delete or backspace key will also perform this action. - Ctrl+z : Undo the last paste or delete action. .. py:method:: OnKey(event) Handles all key events. .. py:method:: copy() Copies the current range of select cells to clipboard. .. py:method:: build_paste_selection() This method creates the paste selection, builds it into a clipboard string, and puts it on the clipboard. When building the paste selection it fills in replicas of the copy selection if: number of rows and/or columns in the paste selection is larger than the copy selection, and they are multiples of the corresponding copy selection rows and/or columns, otherwise just the copy selection will be used. .. py:method:: paste(mode) Handles paste and undo operations. .. py:method:: delete() This method deletes text from selected cells, places a copy of the deleted cells on the clipboard for pasting (Ctrl+v), and places a copy in the self.data4undo variable for undoing (Ctrl+z)