wx.lib.colourselect.ColourSelect¶A subclass of wx.BitmapButton that, when clicked, will
display a colour selection dialog.
Methods Summary¶Default class constructor. |
|
Returns the current colour set for the |
|
Returns the current set of custom colour values to be shown in the |
|
Returns the current text label for the |
|
Returns the current colour set for the |
|
Creates a bitmap representation of the current selected colour. |
|
Fires the |
|
Handles the |
|
Sets the bitmap representation of the current selected colour to the button. |
|
Sets the current colour for |
|
Sets the list of custom colour values to be shown in colour dialog, if |
|
Sets the new text label for |
|
Sets the current colour for |
Properties Summary¶Returns the current colour set for the |
|
Returns the current set of custom colour values to be shown in the |
|
Returns the current text label for the |
|
Returns the current colour set for the |
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.
parent (wx.Window) – parent window. Must not be None;
id (integer) – window identifier. A value of -1 indicates a default value;
label (string) – the button text label;
wx.Colour – a valid wx.Colour instance, which will be the default initial
colour for this button;
pos (tuple or wx.Point) – the control position. A value of (-1, -1) indicates a default position,
chosen by either the windowing system or wxPython, depending on platform;
size (tuple or wx.Size) – the control size. A value of (-1, -1) indicates a default size,
chosen by either the windowing system or wxPython, depending on platform;
callback (PyObject) – a callable method/function that will be called every time the user chooses a new colour;
style (integer) – the button style.
GetColour(self)¶Returns the current colour set for the ColourSelect.
GetCustomColours(self)¶Returns the current set of custom colour values to be shown in the colour dialog, if supported.
GetLabel(self)¶Returns the current text label for the ColourSelect.
string
GetValue(self)¶Returns the current colour set for the ColourSelect.
Same as GetColour.
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.
event – a wx.CommandEvent event to be processed.
SetBitmap(self, bmp)¶Sets the bitmap representation of the current selected colour to the button.
bmp (wx.Bitmap) – the new bitmap.
SetColour(self, colour)¶Sets the current colour for ColourSelect.
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.
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.
label (string) – the new text label for ColourSelect.
SetValue(self, colour)¶Sets the current colour for ColourSelect. Same as
SetColour.
colour (tuple or string or wx.Colour) – the new colour for ColourSelect.
Colour¶Returns the current colour set for the ColourSelect.
CustomColours¶Returns the current set of custom colour values to be shown in the colour dialog, if supported.
Label¶Returns the current text label for the ColourSelect.
string
Value¶Returns the current colour set for the ColourSelect.
Same as GetColour.