Package wx :: Class ListBox

[frames | no frames]

## Type ListBox

    object --+
             |
        Object --+
                 |
        EvtHandler --+
                     |
                Window --+
                         |
                   Control --+
                             |
                object --+   |
                         |   |
             ItemContainer --+
                             |
              ControlWithItems --+
                                 |
                                ListBox

Known Subclasses:
  `CheckListBox`

Proxy of C++ ListBox class

Method Summary
ListBox | `__init__(self, parent, id, pos, size, choices, style, validator, name)`
| `AppendAndEnsureVisible(self, s)`
bool | ``Create`(self, parent, id, pos, size, style, validator, name)` Do the 2nd phase and create the GUI control.
| `Deselect(self, n)`
| `DeselectAll(self, itemToLeaveSelected)`
| `EnsureVisible(self, n)`
VisualAttributes | ``GetClassDefaultAttributes`(variant)` Get the default attributes for this class. (Static method)
PyObject | `GetSelections(self)`
int | ``HitTest`(self, pt)` Test where the given (in client coords) point lies
| ``Insert`(self, item, pos, clientData)` Insert an item into the control before the item at the `pos` index, optionally associating some data object with the item.
| ``InsertItems`(*args, **kwargs)` InsertItems(self, wxArrayString items, unsigned int pos)
bool | `IsSelected(self, n)`
bool | `IsSorted(self)`
| ``Select`(self, n)` This is the same as `SetSelection` and exists only because it is slightly more natural for controls which support multiple selection.
| `Set(self, items)`
| `SetFirstItem(self, n)`
| `SetFirstItemStr(self, s)`
| `SetItemBackgroundColour(self, item, c)`
| `SetItemFont(self, item, f)`
| `SetItemForegroundColour(self, item, c)`
| ``SetSelection`(self, n)` Sets the item at index 'n' to be the selected item.
bool | `SetStringSelection(self, s, select)`

Property Summary
| `Selections`: See `GetSelections`
| `thisown`: The membership flag

Instance Method Details

### Create(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, choices=wxPyEmptyStringArray, style=0, validator=DefaultValidator, name=ListBoxNameStr)

Do the 2nd phase and create the GUI control.

  Parameters:
    `parent`
    (type=Window)

    `id`
    (type=int)

    `pos`
    (type=Point)

    `size`
    (type=Size)

    `style`
    (type=long)

    `validator`
    (type=Validator)

    `name`
    (type=String)

  Returns:
    bool
  Overrides:
    `wx.Control.Create` (inherited documentation)

### HitTest(self, pt)

Test where the given (in client coords) point lies

  Parameters:
    `pt`
    (type=Point)

  Returns:
    int
  Overrides:
    `wx.Window.HitTest`

### Insert(self, item, pos, clientData=None)

Insert an item into the control before the item at the `pos` index, optionally associating some data object with the item.

  Parameters:
    `item`
    (type=String)

    `pos`
    (type=int)

    `clientData`
    (type=PyObject)

  Overrides:
    `wx.ItemContainer.Insert`

### InsertItems(*args, **kwargs)

InsertItems(self, wxArrayString items, unsigned int pos)

### Select(self, n)

This is the same as `SetSelection` and exists only because it is slightly more natural for controls which support multiple selection.

  Parameters:
    `n`
    (type=int)

  Overrides:
    `wx.ItemContainer.Select`

### SetSelection(self, n, select=True)

Sets the item at index 'n' to be the selected item.

  Parameters:
    `n`
    (type=int)

  Overrides:
    `wx.ItemContainer.SetSelection` (inherited documentation)

Static Method Details

### GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)

Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes.

The variant parameter is only relevant under Mac currently and is ignore under other platforms. Under Mac, it will change the size of the returned font. See `wx.Window.SetWindowVariant` for more about this.

  Parameters:
    `variant`
    (type=int)

  Returns:
    VisualAttributes

Property Details

### Selections

See `GetSelections`

  Get Method:
    `GetSelections`(self)

### thisown

The membership flag

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:11:50 2007 | http://epydoc.sf.net