![]() |
![]() |
It is very similar to a ComboBox, but it displays the selected value in an entry to allow modifying it.
In contrast to a ComboBox, the underlying model of a ComboBoxEntry must always have a text column (see set_text_column()), and the entry will show the content of the text column in the selected row.
See also ComboBoxEntryText, , which is specialised for a single text column.
To add and remove strings from the list, just modify the model using its data manipulation API. You can get the* Entry by using get_child().
Public Member Functions | |
ComboBoxEntry (const Glib::RefPtr<TreeModel>& model, int text_column=0) | |
Creates a new ComboBoxEntry which has an Entry as child and a list of strings as popup. | |
ComboBoxEntry (const Glib::RefPtr<TreeModel>& model, const TreeModelColumnBase& text_column) | |
Creates a new ComboBoxEntry which has an Entry as child and a list of strings as popup. | |
ComboBoxEntry () | |
const Entry* | get_entry () const |
| |
Entry* | get_entry () |
| |
int | get_text_column () const |
Returns the column which entry_box is using to get the strings from. | |
const GtkComboBoxEntry* | gobj () const |
Provides access to the underlying C GtkObject. | |
GtkComboBoxEntry* | gobj () |
Provides access to the underlying C GtkObject. | |
void | set_text_column (int text_column) const |
Sets the model column which entry_box should use to get strings from to be text_column . | |
void | set_text_column (const TreeModelColumnBase& text_column) const |
Sets the model column which entry_box should use to get strings from to be text_column . | |
virtual | ~ComboBoxEntry () |
Related Functions | |
(Note that these are not member functions.) | |
Gtk::ComboBoxEntry* | wrap (GtkComboBoxEntry* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
virtual Gtk::ComboBoxEntry::~ComboBoxEntry | ( | ) | [virtual] |
Gtk::ComboBoxEntry::ComboBoxEntry | ( | ) |
Gtk::ComboBoxEntry::ComboBoxEntry | ( | const Glib::RefPtr<TreeModel>& | model, | |
const TreeModelColumnBase& | text_column | |||
) | [explicit] |
Creates a new ComboBoxEntry which has an Entry as child and a list of strings as popup.
You can get the Entry from a ComboBoxEntry using get_entry(). To add and remove strings from the list, just modify model using its data manipulation API.
model | A TreeModel. | |
text_column | A column in model to get the strings from. |
Gtk::ComboBoxEntry::ComboBoxEntry | ( | const Glib::RefPtr<TreeModel>& | model, | |
int | text_column = 0 | |||
) | [explicit] |
Creates a new ComboBoxEntry which has an Entry as child and a list of strings as popup.
You can get the Entry from a ComboBoxEntry using get_entry(). To add and remove strings from the list, just modify model using its data manipulation API.
model | A TreeModel. | |
text_column | A column in model to get the strings from. |
const Entry* Gtk::ComboBoxEntry::get_entry | ( | ) | const |
Entry* Gtk::ComboBoxEntry::get_entry | ( | ) |
int Gtk::ComboBoxEntry::get_text_column | ( | ) | const |
Returns the column which entry_box is using to get the strings from.
const GtkComboBoxEntry* Gtk::ComboBoxEntry::gobj | ( | ) | const [inline] |
GtkComboBoxEntry* Gtk::ComboBoxEntry::gobj | ( | ) | [inline] |
void Gtk::ComboBoxEntry::set_text_column | ( | int | text_column | ) | const |
Sets the model column which entry_box should use to get strings from to be text_column .
text_column | A column in model to get the strings from. |
void Gtk::ComboBoxEntry::set_text_column | ( | const TreeModelColumnBase& | text_column | ) | const |
Sets the model column which entry_box should use to get strings from to be text_column .
text_column | A column in model to get the strings from. |
Gtk::ComboBoxEntry* wrap | ( | GtkComboBoxEntry * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |