gtk-0.12.2: Binding to the Gtk+ graphical user interface library.

Portability | portable (depends on GHC)
Stability | provisional
Maintainer | gtk2hs-users@lists.sourceforge.net

Graphics.UI.Gtk.MenuComboToolbar.Combo

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes

Description

A text entry field with a dropdown list

- Warning: this module is deprecated and should not be used in newly-written code.

Synopsis

- data Combo
- class HBoxClass o => ComboClass o
- castToCombo :: GObjectClass obj => obj -> Combo
- gTypeCombo :: GType
- toCombo :: ComboClass o => o -> Combo
- comboNew :: IO Combo
- comboSetPopdownStrings :: ComboClass self => self -> [String] -> IO ()
- comboSetValueInList :: ComboClass self => self -> Bool -> Bool -> IO ()
- comboSetUseArrows :: ComboClass self => self -> Bool -> IO ()
- comboSetUseArrowsAlways :: ComboClass self => self -> Bool -> IO ()
- comboSetCaseSensitive :: ComboClass self => self -> Bool -> IO ()
- comboDisableActivate :: ComboClass self => self -> IO ()
- comboEnableArrowKeys :: ComboClass self => Attr self Bool
- comboEnableArrowsAlways :: ComboClass self => Attr self Bool
- comboCaseSensitive :: ComboClass self => Attr self Bool
- comboAllowEmpty :: ComboClass self => Attr self Bool
- comboValueInList :: ComboClass self => Attr self Bool

# Detail

The `Combo` widget consists of a single-line text entry field and a drop-down list. The drop-down list is displayed when the user clicks on a small arrow button to the right of the entry field.

List elements can contain arbitrary widgets, but if an element is not a plain label, then you must use the `comboSetItemString` function. This sets the string which will be placed in the text entry field when the item is selected.

By default, the user can step through the items in the list using the arrow (cursor) keys, though this behaviour can be turned off with `comboSetUseArrows`.

As of Gtk+ 2.4, `Combo` has been deprecated in favor of `ComboBox`.

# Class Hierarchy

     | GObject
     | +----Object
     | +----Widget
     | +----Container
     | +----Box
     | +----HBox
     | +----Combo

# Types

data Combo

Instances

Eq Combo |
Ord Combo |
GObjectClass Combo |
ComboClass Combo |
HBoxClass Combo |
BoxClass Combo |
ContainerClass Combo |
WidgetClass Combo |
ObjectClass Combo |

class HBoxClass o => ComboClass o

Instances

ComboClass Combo |

castToCombo :: GObjectClass obj => obj -> Combo

gTypeCombo :: GType

toCombo :: ComboClass o => o -> Combo

# Constructors

comboNew :: IO Combo

# Methods

comboSetPopdownStrings :: ComboClass self => self -> [String] -> IO ()

Insert a set of Strings into the `Combo` drop down list.

comboSetValueInList

Arguments

:: ComboClass self |
=> self |
-> Bool | `val` - `True` if the value entered must match one of the values in the list.
-> Bool | `okIfEmpty` - `True` if an empty value is considered valid.
-> IO () |

Specifies whether the value entered in the text entry field must match one of the values in the list. If this is set then the user will not be able to perform any other action until a valid value has been entered.

If an empty field is acceptable, the `okIfEmpty` parameter should be `True`.

comboSetUseArrows :: ComboClass self => self -> Bool -> IO ()

Specifies if the arrow (cursor) keys can be used to step through the items in the list. This is on by default.

comboSetUseArrowsAlways :: ComboClass self => self -> Bool -> IO ()

Obsolete function, does nothing.

comboSetCaseSensitive :: ComboClass self => self -> Bool -> IO ()

Specifies whether the text entered into the `Entry` field and the text in the list items is case sensitive.

This may be useful, for example, when you have called `comboSetValueInList` to limit the values entered, but you are not worried about differences in case.

comboDisableActivate :: ComboClass self => self -> IO ()

Stops the `Combo` widget from showing the popup list when the `Entry` emits the "activate" signal, i.e. when the Return key is pressed. This may be useful if, for example, you want the Return key to close a dialog instead.

# Attributes

comboEnableArrowKeys :: ComboClass self => Attr self Bool

Whether the arrow keys move through the list of items.

Default value: `True`

comboEnableArrowsAlways :: ComboClass self => Attr self Bool

Obsolete property, ignored.

Default value: `True`

comboCaseSensitive :: ComboClass self => Attr self Bool

Whether list item matching is case sensitive.

Default value: `False`

comboAllowEmpty :: ComboClass self => Attr self Bool

Whether an empty value may be entered in this field.

Default value: `True`

comboValueInList :: ComboClass self => Attr self Bool

Whether entered values must already be present in the list.

Default value: `False`