Gtk2HsContentsIndex
Graphics.UI.Gtk.MenuComboToolbar.ComboBoxEntry
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Detail
Class Hierarchy
Types
Constructors
Methods
Attributes
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
comboBoxEntryNew :: IO ComboBoxEntry
comboBoxEntryNewWithModel :: TreeModelClass model => model -> Int -> IO ComboBoxEntry
comboBoxEntryNewText :: IO ComboBoxEntry
comboBoxEntrySetTextColumn :: ComboBoxEntryClass self => self -> Int -> IO ()
comboBoxEntryGetTextColumn :: ComboBoxEntryClass self => self -> IO Int
comboBoxEntryTextColumn :: ComboBoxEntryClass self => Attr self Int
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.

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
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
:: TreeModelClass model
=> modelmodel - A TreeModel.
-> InttextColumn - A column in model to get the strings from.
-> 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.
Methods
comboBoxEntrySetTextColumn
:: ComboBoxEntryClass self
=> self
-> InttextColumn - A column in the model to get the strings from.
-> IO ()
Sets the model column which the entry box should use to get strings from to be textColumn.
comboBoxEntryGetTextColumn
:: ComboBoxEntryClass self
=> self
-> IO Intreturns a column in the data source model of the entry box.
Returns the column which the entry box is using to get the strings from.
Attributes
comboBoxEntryTextColumn :: ComboBoxEntryClass self => Attr self Int

A column in the data source model to get the strings from.

Allowed values: >= -1

Default value: -1

Produced by Haddock version 0.7