wx.lib.colourselect.ColourSelect¶A subclass of wx.BitmapButton that, when clicked, will
display a colour selection dialog.
Methods Summary¶__init__ |
Default class constructor. |
GetColour |
Returns the current colour set for the ColourSelect. |
GetCustomColours |
Returns the current set of custom colour values to be shown in the |
GetLabel |
Returns the current text label for the ColourSelect. |
GetValue |
Returns the current colour set for the ColourSelect. |
MakeBitmap |
Creates a bitmap representation of the current selected colour. |
OnChange |
Fires the EVT_COLOURSELECT event, as the user has changed the current colour. |
OnClick |
Handles the wx.EVT_BUTTON event for ColourSelect. |
SetBitmap |
Sets the bitmap representation of the current selected colour to the button. |
SetColour |
Sets the current colour for ColourSelect. |
SetCustomColours |
Sets the list of custom colour values to be shown in colour dialog, if |
SetLabel |
Sets the new text label for wx.ColourSelect. |
SetValue |
Sets the current colour for ColourSelect. Same as |
Properties Summary¶Colour |
Returns the current colour set for the ColourSelect. |
CustomColours |
Returns the current set of custom colour values to be shown in the |
Label |
Returns the current text label for the ColourSelect. |
Value |
Returns the current colour set for the ColourSelect. |
Class API¶ColourSelect(wx.lib.buttons.GenBitmapButton)¶A subclass of wx.BitmapButton that, when clicked, will
display a colour selection dialog.
__init__(self, parent, id=wx.ID_ANY, label="", colour=wx.BLACK, pos=wx.DefaultPosition, size=wx.DefaultSize, callback=None, style=0)¶Default class constructor.
| Parameters: |
|
|---|
GetColour(self)¶Returns the current colour set for the ColourSelect.
| Return type: | wx.Colour |
|---|
GetCustomColours(self)¶Returns the current set of custom colour values to be shown in the colour dialog, if supported.
| Return type: | CustomColourData |
|---|
GetLabel(self)¶Returns the current text label for the ColourSelect.
| Return type: | string |
|---|
GetValue(self)¶Returns the current colour set for the ColourSelect.
Same as GetColour.
| Return type: | wx.Colour |
|---|
MakeBitmap(self)¶Creates a bitmap representation of the current selected colour.
OnChange(self)¶Fires the EVT_COLOURSELECT event, as the user has changed the current colour.
OnClick(self, event)¶Handles the wx.EVT_BUTTON event for ColourSelect.
| Parameters: | event – a wx.CommandEvent event to be processed. |
|---|
SetBitmap(self, bmp)¶Sets the bitmap representation of the current selected colour to the button.
| Parameters: | bmp (wx.Bitmap) – the new bitmap. |
|---|
SetColour(self, colour)¶Sets the current colour for ColourSelect.
| Parameters: | colour (tuple or string or wx.Colour) – the new colour for ColourSelect. |
|---|
SetCustomColours(self, colours)¶Sets the list of custom colour values to be shown in colour dialog, if supported.
| Parameters: | colours – An instance of CustomColourData or a 16 |
|---|
element list of None or wx.Colour values.
SetLabel(self, label)¶Sets the new text label for wx.ColourSelect.
| Parameters: | label (string) – the new text label for ColourSelect. |
|---|
SetValue(self, colour)¶Sets the current colour for ColourSelect. Same as
SetColour.
| Parameters: | colour (tuple or string or wx.Colour) – the new colour for ColourSelect. |
|---|
Colour¶Returns the current colour set for the ColourSelect.
| Return type: | wx.Colour |
|---|
CustomColours¶Returns the current set of custom colour values to be shown in the colour dialog, if supported.
| Return type: | CustomColourData |
|---|
Label¶Returns the current text label for the ColourSelect.
| Return type: | string |
|---|
Value¶Returns the current colour set for the ColourSelect.
Same as GetColour.
| Return type: | wx.Colour |
|---|