[−][src]Trait gtk::ComboBoxTextExt
Required methods
fn append(&self, id: Option<&str>, text: &str)
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 ComboBoxTextExt::insert
with a
position of -1.
id
a string ID for this value, or None
text
A string
fn append_text(&self, text: &str)
Appends text
to the list of strings stored in self
.
This is the same as calling ComboBoxTextExt::insert_text
with a
position of -1.
text
A string
fn get_active_text(&self) -> Option<GString>
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
.
fn insert(&self, position: i32, id: Option<&str>, text: &str)
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
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
fn insert_text(&self, position: i32, text: &str)
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 ComboBoxTextExt::insert
with a None
ID string.
position
An index to insert text
text
A string
fn prepend(&self, id: Option<&str>, text: &str)
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 ComboBoxTextExt::insert
with a
position of 0.
id
a string ID for this value, or None
text
a string
fn prepend_text(&self, text: &str)
Prepends text
to the list of strings stored in self
.
This is the same as calling ComboBoxTextExt::insert_text
with a
position of 0.
text
A string
fn remove(&self, position: i32)
fn remove_all(&self)
Removes all the text entries from the combo box.