Class: Gtk::ComboBoxText

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#active_textString

Returns the currently active string in combo_box, or nil if none is selected. If combo_box contains an entry, this function will return its contents (which will not necessarily be an item from the list).

Returns:

  • (String)

    a newly allocated string containing the currently active text. Must be freed with g_free().

#append(id, text) ⇒ nil

Appends text to the list of strings stored in combo_box. If id is non-nil then it is used as the ID of the row.

This is the same as calling gtk_combo_box_text_insert() with a position of -1.

Parameters:

  • id (String)

    a string ID for this value, or nil

  • text (String)

    A string

Returns:

  • (nil)

#append_text(text) ⇒ nil

Appends text to the list of strings stored in combo_box.

This is the same as calling gtk_combo_box_text_insert_text() with a position of -1.

Parameters:

  • text (String)

    A string

Returns:

  • (nil)

#insert(position, id, text) ⇒ nil

Inserts text at position in the list of strings stored in combo_box. If id is non-nil then it is used as the ID of the row. See Gtk::ComboBox:id-column.

If position is negative then text is appended.

Parameters:

  • position (Integer)

    An index to insert text

  • id (String)

    a string ID for this value, or nil

  • text (String)

    A string to display

Returns:

  • (nil)

#insert_text(position, text) ⇒ nil

Inserts text at position in the list of strings stored in combo_box.

If position is negative then text is appended.

This is the same as calling gtk_combo_box_text_insert() with a nil ID string.

Parameters:

  • position (Integer)

    An index to insert text

  • text (String)

    A string

Returns:

  • (nil)

#newGtk::Widget

Creates a new Gtk::ComboBoxText, which is a #GtkComboBox just displaying strings.

Returns:

#new_with_entryGtk::Widget

Creates a new Gtk::ComboBoxText, which is a #GtkComboBox just displaying strings. The combo box created by this function has an entry.

Returns:

#prepend(id, text) ⇒ nil

Prepends text to the list of strings stored in combo_box. If id is non-nil then it is used as the ID of the row.

This is the same as calling gtk_combo_box_text_insert() with a position of 0.

Parameters:

  • id (String)

    a string ID for this value, or nil

  • text (String)

    a string

Returns:

  • (nil)

#prepend_text(text) ⇒ nil

Prepends text to the list of strings stored in combo_box.

This is the same as calling gtk_combo_box_text_insert_text() with a position of 0.

Parameters:

  • text (String)

    A string

Returns:

  • (nil)

#remove(position) ⇒ nil

Removes the string at position from combo_box.

Parameters:

  • position (Integer)

    Index of the item to remove

Returns:

  • (nil)

#remove_allnil

Removes all the text entries from the combo box.

Returns:

  • (nil)