Gtk2HsContentsIndex
Graphics.UI.Gtk.ModelView.ComboBoxEntry
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Detail
Class Hierarchy
Types
Constructors
Description

A text entry field with a dropdown list

  • Module available since Gtk+ version 2.4
Synopsis
data ComboBoxEntry
class ComboBoxClass o => ComboBoxEntryClass o
castToComboBoxEntry :: GObjectClass obj => obj -> ComboBoxEntry
toComboBoxEntry :: ComboBoxEntryClass o => o -> ComboBoxEntry
comboBoxEntryNew :: IO ComboBoxEntry
comboBoxEntryNewWithModel :: (TypedTreeModelClass model, TreeModelClass (model String)) => model String -> IO ComboBoxEntry
comboBoxEntryNewText :: IO ComboBoxEntry
comboBoxEntrySetTextModel :: (TypedTreeModelClass model, TreeModelClass (model String)) => ComboBoxEntry -> model String -> IO ()
Detail

A ComboBoxEntry 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 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 comboBoxEntrySetTextColumn), and the entry will show the content of the text column in the selected row. To get the text from the entry, use comboBoxGetActiveText.

The convenience API to construct simple text-only ComboBoxes can also be used with ComboBoxEntrys which have been constructed with comboBoxEntryNewText.

Class Hierarchy
 |  GObject
 |   +----Object
 |         +----Widget
 |               +----Container
 |                     +----Bin
 |                           +----ComboBox
 |                                 +----ComboBoxEntry
 
Types
data ComboBoxEntry
show/hide Instances
class ComboBoxClass o => ComboBoxEntryClass o
show/hide Instances
castToComboBoxEntry :: GObjectClass obj => obj -> ComboBoxEntry
toComboBoxEntry :: ComboBoxEntryClass o => o -> ComboBoxEntry
Constructors
comboBoxEntryNew :: IO ComboBoxEntry
Creates a new ComboBoxEntry which has a Entry as child. After construction, you should set a model using comboBoxSetModel and a text column using comboBoxEntrySetTextColumn.
comboBoxEntryNewWithModel
:: (TypedTreeModelClass model, TreeModelClass (model String))
=> model Stringmodel - A CustomStore.
-> IO ComboBoxEntry
Creates a new ComboBoxEntry which has a Entry as child and a list of strings as popup. You can get the Entry from a ComboBoxEntry using binGetChild. To add and remove strings from the list, just modify model using its data manipulation API.
comboBoxEntryNewText :: IO ComboBoxEntry
Convenience function which constructs a new editable text combo box, which is a ComboBoxEntry just displaying strings. If you use this function to create a text combo box, you should only manipulate its data source with the following convenience functions: comboBoxAppendText, comboBoxInsertText, comboBoxPrependText and comboBoxRemoveText.
comboBoxEntrySetTextModel
:: (TypedTreeModelClass model, TreeModelClass (model String))
=> ComboBoxEntry
-> model Stringmodel - The model of Strings.
-> IO ()
Sets the model of Strings, inserts a CellRendererText.
Produced by Haddock version 0.8