Renders a combobox in a cell
<gtk-cell-renderer-combo> renders text in a cell like
<gtk-cell-renderer-text> from which it is derived. But while
<gtk-cell-renderer-text> offers a simple entry to edit the text,
<gtk-cell-renderer-combo> offers a
<gtk-combo-box-entry> widget to edit the text. The values to display in
the combo box are taken from the tree model specified in the model property.
The combo cell renderer takes care of adding a text cell renderer to the combo box and sets it to display the column specified by its text-column property. Further properties of the comnbo box can be set in a handler for the editing-started signal.
<gtk-cell-renderer-combo> cell renderer was added in GTK+ 2.6.
This class defines the following slots:
- The model containing the possible values for the combo box
- A column in the data source model to get the strings from
- If FALSE, don't allow to enter strings other than the chosen ones
Creates a new
<gtk-cell-renderer-combo>. Adjust how text is drawn using object properties. Object properties can be set globally (with
g-object-set). Also, with
<gtk-tree-view-column>, you can bind a property to a value in a
<gtk-tree-model>. 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
- the new cell renderer