GtkComboBoxEntry {RGtk2} | R Documentation

## GtkComboBoxEntry

### Description

A text entry field with a dropdown list

### Methods and Functions

`gtkComboBoxEntryNew(show = TRUE)`
`gtkComboBoxEntryNewWithModel(model, text.column, show = TRUE)`
`gtkComboBoxEntryNewText()`
`gtkComboBoxEntrySetTextColumn(object, text.column)`
`gtkComboBoxEntryGetTextColumn(object)`
`gtkComboBoxEntry(model, text.column, show = TRUE)`

### Hierarchy

    GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkComboBox
                                           +----GtkComboBoxEntry

### Interfaces

GtkComboBoxEntry implements AtkImplementorIface, `GtkBuildable`, `GtkCellLayout` and `GtkCellEditable`.

### Detailed Description

A `GtkComboBoxEntry` is a widget that allows the user to choose from a list of valid choices or enter a different value. It is very similar to a `GtkComboBox`, but it displays the selected value in an entry to allow modifying it.

In contrast to a `GtkComboBox`, the underlying model of a `GtkComboBoxEntry` must always have a text column (see `gtkComboBoxEntrySetTextColumn`), and the entry will show the content of the text column in the selected row. To get the text from the entry, use `gtkComboBoxGetActiveText`.

The changed signal will be emitted while typing into a GtkComboBoxEntry, as well as when selecting an item from the GtkComboBoxEntry's list. Use `gtkComboBoxGetActive` or `gtkComboBoxGetActiveIter` to discover whether an item was actually selected from the list.

Connect to the activate signal of the GtkEntry (use `gtkBinGetChild`) to detect when the user actually finishes entering text.

The convenience API to construct simple text-only `GtkComboBox`es can also be used with `GtkComboBoxEntry`s which have been constructed with `gtkComboBoxEntryNewText`.

If you have special needs that go beyond a simple entry (e.g. input validation), it is possible to replace the child entry by a different widget using `gtkContainerRemove` and `gtkContainerAdd`.

### GtkComboBoxEntry as GtkBuildable

Beyond the <attributes> support that is shared by all GtkCellLayout implementation, GtkComboBoxEntry makes the entry available in UI definitions as an internal child with name "entry".

### Structures

`GtkComboBoxEntry`

  undocumented

### Convenient Construction

`gtkComboBoxEntry` is the result of collapsing the constructors of `GtkComboBoxEntry` (`gtkComboBoxEntryNew`, `gtkComboBoxEntryNewWithModel`) and accepts a subset of its arguments matching the required arguments of one of its delegate constructors.

### Properties

`text-column` [integer : Read / Write]

  A column in the data source model to get the strings from. Allowed values: >= -1 Default value: -1

### Author(s)

Derived by RGtkGen from GTK+ documentation

### References

https://developer.gnome.org/gtk2/stable/GtkComboBoxEntry.html

### See Also

`GtkComboBox`

[Package RGtk2 version 2.20.36.3 Index]