pub trait ComboBoxTextExt: 'static {
    fn append(&self, id: Option<&str>, text: &str);
    fn append_text(&self, text: &str);
    fn active_text(&self) -> Option<GString>;
    fn insert(&self, position: i32, id: Option<&str>, text: &str);
    fn insert_text(&self, position: i32, text: &str);
    fn prepend(&self, id: Option<&str>, text: &str);
    fn prepend_text(&self, text: &str);
    fn remove(&self, position: i32);
    fn remove_all(&self);
}
Expand description

Trait containing all ComboBoxText methods.

Implementors

ComboBoxText

Required Methods

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

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

id

a string ID for this value, or None

text

A string

Appends text to the list of strings stored in self.

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

text

A string

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

Returns

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

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

If position is negative then text is appended.

position

An index to insert text

id

a string ID for this value, or None

text

A string to display

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

If position is negative then text is appended.

This is the same as calling insert() with a None ID string.

position

An index to insert text

text

A string

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

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

id

a string ID for this value, or None

text

a string

Prepends text to the list of strings stored in self.

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

text

A string

Removes the string at position from self.

position

Index of the item to remove

Removes all the text entries from the combo box.

Implementors