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

Type Choice

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

Known Subclasses:
DirFilterListCtrl

A Choice control is used to select one of a list of strings. Unlike a wx.ListBox, only the selection is visible until the user pulls down the menu of choices.

Events

EVT_CHOICE Sent when an item in the list is selected.

Method Summary
Choice __init__(parent, id, pos, size, choices, style, validator, name)
Create and show a Choice control
bool Create(parent, id, pos, size, choices, style, validator, name)
Actually create the GUI Choice control for 2-phase creation
VisualAttributes GetClassDefaultAttributes(variant)
Get the default attributes for this class. (Static method)
int GetCurrentSelection(self)
Unlike GetSelection which only returns the accepted selection value, i.e.

Property Summary
  CurrentSelection: See GetCurrentSelection
  thisown: The membership flag

Instance Method Details

__init__(parent, id, pos=DefaultPosition, size=DefaultSize, choices=EmptyList, style=0, validator=DefaultValidator, name=ChoiceNameStr)
(Constructor)

Create and show a Choice control

Parameters:
parent
           (type=Window)

id
           (type=int)

pos
           (type=Point)

size
           (type=Size)

choices
           (type=List)

style
           (type=long)

validator
           (type=Validator)

name
           (type=String)

Returns:
Choice
Overrides:
wx.ControlWithItems.__init__

Create(parent, id, pos=DefaultPosition, size=DefaultSize, choices=EmptyList, style=0, validator=DefaultValidator, name=ChoiceNameStr)

Actually create the GUI Choice control for 2-phase creation

Parameters:
parent
           (type=Window)

id
           (type=int)

pos
           (type=Point)

size
           (type=Size)

choices
           (type=List)

style
           (type=long)

validator
           (type=Validator)

name
           (type=String)

Returns:
bool
Overrides:
wx.Control.Create

GetCurrentSelection(self)

Unlike GetSelection which only returns the accepted selection value, i.e. the selection in the control once the user closes the dropdown list, this function returns the current selection. That is, while the dropdown list is shown, it returns the currently selected item in it. When it is not shown, its result is the same as for the other function.

Returns:
int

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

CurrentSelection

See GetCurrentSelection

Get Method:
GetCurrentSelection(self)

thisown

The membership flag


Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:08:17 2007 http://epydoc.sf.net