Class
GtkCellRendererCombo
deprecated: 4.10 since: 4.0
Description [src]
final class Gtk.CellRendererCombo : Gtk.CellRendererText
{
/* No available fields */
}
Renders a combobox in a cell
GtkCellRendererCombo
renders text in a cell like GtkCellRendererText
from
which it is derived. But while GtkCellRendererText
offers a simple entry to
edit the text, GtkCellRendererCombo
offers a GtkComboBox
widget to edit the text. The values to display in the combo box are taken from
the tree model specified in the GtkCellRendererCombo
: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
GtkCellRendererCombo
:text-column property. Further properties of the combo box
can be set in a handler for the GtkCellRenderer::editing-started
signal.
Available since: 4.0
Deprecated since: 4.10
List views use widgets to display their contents. You
should use GtkDropDown
instead.
Constructors
gtk_cell_renderer_combo_new
Creates a new GtkCellRendererCombo
.
Adjust how text is drawn using object properties.
Object properties can be set globally (with g_object_set()).
Also, with GtkTreeViewColumn
, you can bind a property to a value
in a GtkTreeModel
. 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 GtkTreeView
.
deprecated: 4.10 since: 4.0
Instance methods
Methods inherited from GtkCellRendererText (1)
gtk_cell_renderer_text_set_fixed_height_from_font
Sets the height of a renderer to explicitly be determined by the “font” and
“y_pad” property set on it. Further changes in these properties do not
affect the height, so they must be accompanied by a subsequent call to this
function. Using this function is inflexible, and should really only be used
if calculating the size of a cell is too slow (ie, a massive number of cells
displayed). If number_of_rows
is -1, then the fixed height is unset, and
the height is determined by the properties again.
deprecated: 4.10 since: 4.0
Methods inherited from GtkCellRenderer (27)
Please see GtkCellRenderer for a full list of methods.
Properties
Gtk.CellRendererCombo:has-entry
If TRUE
, the cell renderer will include an entry and allow to enter
values other than the ones in the popup list.
since: 4.0
Gtk.CellRendererCombo:model
Holds a tree model containing the possible values for the combo box. Use the text_column property to specify the column holding the values.
since: 4.0
Gtk.CellRendererCombo:text-column
Specifies the model column which holds the possible values for the combo box.
since: 4.0
Properties inherited from GtkCellRendererText (46)
Gtk.CellRendererText:align-set
since: 4.0
Gtk.CellRendererText:alignment
Specifies how to align the lines of text with respect to each other.
since: 4.0
Gtk.CellRendererText:attributes
since: 4.0
Gtk.CellRendererText:background
since: 4.0
Gtk.CellRendererText:background-rgba
Background color as a GdkRGBA
since: 4.0
Gtk.CellRendererText:background-set
since: 4.0
Gtk.CellRendererText:editable
since: 4.0
Gtk.CellRendererText:editable-set
since: 4.0
Gtk.CellRendererText:ellipsize
Specifies the preferred place to ellipsize the string, if the cell renderer
does not have enough room to display the entire string. Setting it to
PANGO_ELLIPSIZE_NONE
turns off ellipsizing. See the wrap-width property
for another way of making the text fit into a given width.
since: 4.0
Gtk.CellRendererText:ellipsize-set
since: 4.0
Gtk.CellRendererText:family
since: 4.0
Gtk.CellRendererText:family-set
since: 4.0
Gtk.CellRendererText:font
since: 4.0
Gtk.CellRendererText:font-desc
since: 4.0
Gtk.CellRendererText:foreground
since: 4.0
Gtk.CellRendererText:foreground-rgba
Foreground color as a GdkRGBA
since: 4.0
Gtk.CellRendererText:foreground-set
since: 4.0
Gtk.CellRendererText:language
since: 4.0
Gtk.CellRendererText:language-set
since: 4.0
Gtk.CellRendererText:markup
since: 4.0
Gtk.CellRendererText:max-width-chars
The desired maximum width of the cell, in characters. If this property is set to -1, the width will be calculated automatically.
since: 4.0
Gtk.CellRendererText:placeholder-text
The text that will be displayed in the GtkCellRenderer
if
GtkCellRendererText:editable
is TRUE
and the cell is empty.
since: 4.0
Gtk.CellRendererText:rise
since: 4.0
Gtk.CellRendererText:rise-set
since: 4.0
Gtk.CellRendererText:scale
since: 4.0
Gtk.CellRendererText:scale-set
since: 4.0
Gtk.CellRendererText:single-paragraph-mode
since: 4.0
Gtk.CellRendererText:size
since: 4.0
Gtk.CellRendererText:size-points
since: 4.0
Gtk.CellRendererText:size-set
since: 4.0
Gtk.CellRendererText:stretch
since: 4.0
Gtk.CellRendererText:stretch-set
since: 4.0
Gtk.CellRendererText:strikethrough
since: 4.0
Gtk.CellRendererText:strikethrough-set
since: 4.0
Gtk.CellRendererText:style
since: 4.0
Gtk.CellRendererText:style-set
since: 4.0
Gtk.CellRendererText:text
since: 4.0
Gtk.CellRendererText:underline
since: 4.0
Gtk.CellRendererText:underline-set
since: 4.0
Gtk.CellRendererText:variant
since: 4.0
Gtk.CellRendererText:variant-set
since: 4.0
Gtk.CellRendererText:weight
since: 4.0
Gtk.CellRendererText:weight-set
since: 4.0
Gtk.CellRendererText:width-chars
The desired width of the cell, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the cell will request either 3 characters or the property value, whichever is greater.
since: 4.0
Gtk.CellRendererText:wrap-mode
Specifies how to break the string into multiple lines, if the cell renderer does not have enough room to display the entire string. This property has no effect unless the wrap-width property is set.
since: 4.0
Gtk.CellRendererText:wrap-width
Specifies the minimum width at which the text is wrapped. The wrap-mode property can be used to influence at what character positions the line breaks can be placed. Setting wrap-width to -1 turns wrapping off.
since: 4.0
Properties inherited from GtkCellRenderer (15)
Gtk.CellRenderer:cell-background
since: 4.0
Gtk.CellRenderer:cell-background-rgba
Cell background as a GdkRGBA
since: 4.0
Gtk.CellRenderer:cell-background-set
since: 4.0
Gtk.CellRenderer:editing
since: 4.0
Gtk.CellRenderer:height
since: 4.0
Gtk.CellRenderer:is-expanded
since: 4.0
Gtk.CellRenderer:is-expander
since: 4.0
Gtk.CellRenderer:mode
since: 4.0
Gtk.CellRenderer:sensitive
since: 4.0
Gtk.CellRenderer:visible
since: 4.0
Gtk.CellRenderer:width
since: 4.0
Gtk.CellRenderer:xalign
since: 4.0
Gtk.CellRenderer:xpad
since: 4.0
Gtk.CellRenderer:yalign
since: 4.0
Gtk.CellRenderer:ypad
since: 4.0
Signals
Gtk.CellRendererCombo::changed
This 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.
since: 4.0
Signals inherited from GtkCellRendererText (1)
Signals inherited from GtkCellRenderer (2)
GtkCellRenderer::editing-canceled
This signal gets emitted when the user cancels the process of editing a cell. For example, an editable cell renderer could be written to cancel editing when the user presses Escape.
since: 4.0
GtkCellRenderer::editing-started
This signal gets emitted when a cell starts to be edited.
The intended use of this signal is to do special setup
on editable
, e.g. adding a GtkEntryCompletion
or setting
up additional columns in a GtkComboBox
.
since: 4.0
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
since: 2.0