gtk.CellRendererComboan object that
renders a gtk.ComboBoxEntry
into a gtk.TreeView
cell (new in PyGTK 2.6)Synopsisgtk.CellRendererCombogtk.CellRendererTextgtk.CellRendererComboAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.CellRenderer
+-- gtk.CellRendererText
+-- gtk.CellRendererCombo
gtk.CellRendererCombo Propertiesgtk.Object Propertiesgtk.CellRenderer Propertiesgtk.CellRendererText Properties
"has-entry"Read/WriteIf False, don't allow entering strings
other than the given ones. Default value: True. Available
in GTK+ 2.6 and above."model"Read/WriteThe tree model containing the possible values for the combo
box entry. Available in GTK+ 2.6 and above."text-column"Read/WriteA column in the data source model to get the strings from.
Allowed values: >= -1. Default value: -1. Available in GTK+ 2.6 and
above.
gtk.CellRendererCombo Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.CellRenderer Signal Prototypesgtk.CellRendererText Signal Prototypes"changed"callbackcombopath_stringnew_iteruser_param1...DescriptionThis object is available in PyGTK 2.6 and above.The gtk.CellRendererCombo
manages the rendering of a gtk.ComboBoxEntry
into a gtk.TreeView
cell.Constructorgtk.CellRendererComboReturns :the new cell rendererThis constructor is available in PyGTK 2.6 and above.Creates a new gtk.CellRendererCombo.
Rendering parameters are adjusted using the object properties. The object
properties can be set globally (with set_property()).
Also, with gtk.TreeViewColumn,
you can bind a property to a value in a gtk.TreeModel.
For example, you can bind the "text" property on the cell renderer to a
string value in the model, thus rendering a different string in each row of
the gtk.TreeView.SignalsThe "changed" gtk.CellRendererCombo Signalcallbackcombopath_stringnew_iteruser_param1...combo :the object on which the signal is emitted path_string :a string of the path identifying the edited cell
(relative to the tree view model) new_iter :the new iter selected in the combo box
(relative to the combo box model) user_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)
The "changed" signal is emitted each time after the user selected an item in
the combo box, either by using the mouse or the arrow keys. Contrary to GtkComboBox,
GtkCellRendererCombo::changed is not emitted for changes made to a selected item in
the entry. The argument new_iter corresponds to the newly selected item in the combo
box and it is relative to the GtkTreeModel set via the model property on GtkCellRendererCombo.
Note that as soon as you change the model displayed in the tree view, the tree view will
immediately cease the editing operating. This means that you most probably want to refrain
from changing the model until the combo cell renderer emits the edited or editing_canceled signal.
This method is available in PyGTK 2.14 and above.