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

Type ColourPickerCtrl

object --+                    
         |                    
    Object --+                
             |                
    EvtHandler --+            
                 |            
            Window --+        
                     |        
               Control --+    
                         |    
                PickerBase --+
                             |
                            ColourPickerCtrl


This control allows the user to select a colour. The generic implementation is a button which brings up a wx.ColourDialog when clicked. Native implementations may differ but this is usually a (small) widget which give access to the colour-chooser dialog. Window Styles -------------

wx.CLRP_DEFAULT Default style.
wx.CLRP_USE_TEXTCTRL Creates a text control to the left of the picker button which is completely managed by the wx.ColourPickerCtrl and which can be used by the user to specify a colour. The text control is automatically synchronized with the button's value. Use functions defined in wx.PickerBase to modify the text control.
wx.CLRP_SHOW_LABEL Shows the colour in HTML form (AABBCC) as the colour button label (instead of no label at all).

Events

EVT_COLOURPICKER_CHANGED The user changed the colour selected in the control either using the button or using the text control (see wx.CLRP_USE_TEXTCTRL; note that in this case the event is fired only if the user's input is valid, i.e. recognizable).

Method Summary
ColourPickerCtrl __init__(self, parent, id, col, pos, size, style, validator, name)
This control allows the user to select a colour.
bool Create(self, parent, id, pos, size, style, validator, name)
Do the 2nd phase and create the GUI control.
Colour GetColour(self)
Returns the currently selected colour.
  SetColour(self, col)
Set the displayed colour.

Property Summary
  Colour: See GetColour and SetColour
  thisown: The membership flag

Instance Method Details

__init__(self, parent, id=-1, col=*wxBLACK, pos=DefaultPosition, size=DefaultSize, style=CLRP_DEFAULT_STYLE, validator=DefaultValidator, name=ColourPickerCtrlNameStr)
(Constructor)

This control allows the user to select a colour. The generic implementation is a button which brings up a wx.ColourDialog when clicked. Native implementations may differ but this is usually a (small) widget which give access to the colour-chooser dialog. Window Styles -------------

wx.CLRP_DEFAULT Default style.
wx.CLRP_USE_TEXTCTRL Creates a text control to the left of the picker button which is completely managed by the wx.ColourPickerCtrl and which can be used by the user to specify a colour. The text control is automatically synchronized with the button's value. Use functions defined in wx.PickerBase to modify the text control.
wx.CLRP_SHOW_LABEL Shows the colour in HTML form (AABBCC) as the colour button label (instead of no label at all).

Events

EVT_COLOURPICKER_CHANGED The user changed the colour selected in the control either using the button or using the text control (see wx.CLRP_USE_TEXTCTRL; note that in this case the event is fired only if the user's input is valid, i.e. recognizable).
Parameters:
parent
           (type=Window)

id
           (type=int)

col
           (type=Colour)

pos
           (type=Point)

size
           (type=Size)

style
           (type=long)

validator
           (type=Validator)

name
           (type=String)

Returns:
ColourPickerCtrl
Overrides:
wx.PickerBase.__init__

Create(self, parent, id, col=*wxBLACK, pos=DefaultPosition, size=DefaultSize, style=CLRP_DEFAULT_STYLE, validator=DefaultValidator, name=ColourPickerCtrlNameStr)

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)

GetColour(self)

Returns the currently selected colour.

Returns:
Colour

SetColour(self, col)

Set the displayed colour.

Parameters:
col
           (type=Colour)


Property Details

Colour

See GetColour and SetColour

Get Method:
GetColour(self)
Set Method:
SetColour(self, col)

thisown

The membership flag


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