Class: Gtk::CellRendererCombo

Inherits:
CellRendererText show all
Defined in:
(unknown)

Overview

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.

Instance Method Summary collapse

Methods inherited from CellRendererText

#align_set=, #align_set?, #alignment, #alignment=, #attributes, #attributes=, #background=, #background_rgba, #background_rgba=, #background_set=, #background_set?, #editable=, #editable?, #editable_set=, #editable_set?, #ellipsize, #ellipsize=, #ellipsize_set=, #ellipsize_set?, #family, #family=, #family_set=, #family_set?, #fixed_height_from_font=, #font, #font=, #font_desc, #font_desc=, #foreground=, #foreground_rgba, #foreground_rgba=, #foreground_set=, #foreground_set?, #language, #language=, #language_set=, #language_set?, #markup=, #max_width_chars, #max_width_chars=, #placeholder_text, #placeholder_text=, #rise, #rise=, #rise_set=, #rise_set?, #scale, #scale=, #scale_set=, #scale_set?, #single_paragraph_mode=, #single_paragraph_mode?, #size, #size=, #size_points, #size_points=, #size_set=, #size_set?, #stretch, #stretch=, #stretch_set=, #stretch_set?, #strikethrough=, #strikethrough?, #strikethrough_set=, #strikethrough_set?, #style, #style=, #style_set=, #style_set?, #text, #text=, #underline, #underline=, #underline_set=, #underline_set?, #variant, #variant=, #variant_set=, #variant_set?, #weight, #weight=, #weight_set=, #weight_set?, #width_chars, #width_chars=, #wrap_mode, #wrap_mode=, #wrap_width, #wrap_width=

Methods inherited from CellRenderer

#activate, #cell_background=, #cell_background_rgba, #cell_background_rgba=, #cell_background_set=, #cell_background_set?, #editing=, #editing?, #get_aligned_area, #get_alignment, #get_fixed_size, #get_padding, #get_preferred_height, #get_preferred_height_for_width, #get_preferred_size, #get_preferred_width, #get_preferred_width_for_height, #get_state, #height, #height=, #is_activatable, #is_expanded, #is_expanded=, #is_expanded?, #is_expander, #is_expander=, #is_expander?, #mode, #mode=, #request_mode, #sensitive, #sensitive=, #sensitive?, #set_alignment, #set_fixed_size, #set_padding, #snapshot, #start_editing, #stop_editing, #visible, #visible=, #visible?, #width, #width=, #xalign, #xalign=, #xpad, #xpad=, #yalign, #yalign=, #ypad, #ypad=

Constructor Details

#initializeGtk::CellRenderer

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.

Instance Method Details

#has_entry=(has_entry) ⇒ Boolean

If true, the cell renderer will include an entry and allow to enter
values other than the ones in the popup list.

Parameters:

  • has_entry (Boolean)

Returns:

  • (Boolean)

    has-entry

  • (Boolean)

    has-entry

#has_entry?Boolean

If true, the cell renderer will include an entry and allow to enter
values other than the ones in the popup list.

Returns:

  • (Boolean)

    has-entry

#modelGtk::TreeModel

Holds a tree model containing the possible values for the combo box.
Use the text_column property to specify the column holding the values.

Returns:

#model=(model) ⇒ Gtk::TreeModel

Holds a tree model containing the possible values for the combo box.
Use the text_column property to specify the column holding the values.

Parameters:

Returns:

#text_columnInteger

Specifies the model column which holds the possible values for the
combo box.

Note that this refers to the model specified in the model property,
not the model backing the tree view to which
this cell renderer is attached.

GtkCellRendererCombo automatically adds a text cell renderer for
this column to its combo box.

Returns:

  • (Integer)

    text-column

#text_column=(text_column) ⇒ Integer

Specifies the model column which holds the possible values for the
combo box.

Note that this refers to the model specified in the model property,
not the model backing the tree view to which
this cell renderer is attached.

GtkCellRendererCombo automatically adds a text cell renderer for
this column to its combo box.

Parameters:

  • text_column (Integer)

Returns:

  • (Integer)

    text-column

  • (Integer)

    text-column