CellEditable#
Deprecated since version 4.10: List views use widgets for displaying their
contents. See Editable for editable text widgets
- class CellEditable(*args, **kwargs)#
Implementations: ComboBox, ComboBoxText, Entry, SpinButton
Interface for widgets that can be used for editing cells
The GtkCellEditable interface must be implemented for widgets to be usable
to edit the contents of a GtkTreeView cell. It provides a way to specify how
temporary widgets should be configured for editing, get the new value, etc.
Methods#
- class CellEditable
- editing_done() None#
Emits the
GtkCellEditable::editing-donesignal.Deprecated since version 4.10: Please do not use it in newly written code
- remove_widget() None#
Emits the
GtkCellEditable::remove-widgetsignal.Deprecated since version 4.10: Please do not use it in newly written code
- start_editing(event: Event | None = None) None#
Begins editing on a
cell_editable.The
GtkCellRendererfor the cell creates and returns aGtkCellEditablefromstart_editing(), configured for theGtkCellRenderertype.start_editing()can then set upcell_editablesuitably for editing a cell, e.g. making the Esc key emitGtkCellEditable::editing-done.Note that the
cell_editableis created on-demand for the current edit; its lifetime is temporary and does not persist across other edits and/or cells.- Parameters:
event – The
GdkEventthat began the editing process, orNoneif editing was initiated programmatically
Properties#
Signals#
- class CellEditable.signals
- editing_done() None#
This signal is a sign for the cell renderer to update its value from the
cell_editable.Implementations of
GtkCellEditableare responsible for emitting this signal when they are done editing, e.g.GtkEntryemits this signal when the user presses Enter. Typical things to do in a handler for ::editing-done are to capture the edited value, disconnect thecell_editablefrom signals on theGtkCellRenderer, etc.editing_done()is a convenience method for emittingGtkCellEditable::editing-done.
- remove_widget() None#
This signal is meant to indicate that the cell is finished editing, and the
cell_editablewidget is being removed and may subsequently be destroyed.Implementations of
GtkCellEditableare responsible for emitting this signal when they are done editing. It must be emitted after theGtkCellEditable::editing-donesignal, to give the cell renderer a chance to update the cell’s value before the widget is removed.remove_widget()is a convenience method for emittingGtkCellEditable::remove-widget.
Virtual Methods#
- class CellEditable
- do_editing_done() None#
Emits the
GtkCellEditable::editing-donesignal.Deprecated since version 4.10: Please do not use it in newly written code
- do_remove_widget() None#
Emits the
GtkCellEditable::remove-widgetsignal.Deprecated since version 4.10: Please do not use it in newly written code
- do_start_editing(event: Event | None = None) None#
Begins editing on a
cell_editable.The
GtkCellRendererfor the cell creates and returns aGtkCellEditablefromstart_editing(), configured for theGtkCellRenderertype.start_editing()can then set upcell_editablesuitably for editing a cell, e.g. making the Esc key emitGtkCellEditable::editing-done.Note that the
cell_editableis created on-demand for the current edit; its lifetime is temporary and does not persist across other edits and/or cells.- Parameters:
event – The
GdkEventthat began the editing process, orNoneif editing was initiated programmatically