Package wx :: Class ListBox
[frames | no frames]

Type ListBox

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

Known Subclasses:
CheckListBox

Method Summary
ListBox __init__(self, parent, id, pos, size, choices, style, validator, name)
  __repr__(self)
  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)
  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(self, items, pos)
bool IsSelected(self, n)
bool IsSorted(self)
  Select(self, n)
Sets the item at index 'n' to be the selected item.
  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)

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)

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

Select(self, n)

Sets the item at index 'n' to be the selected item.
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.Select (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

Generated by Epydoc 2.1.20040428.rpd on Tue Nov 9 17:03:37 2004 http://epydoc.sf.net