wx.ColourData¶
This class holds a variety of information related to colour dialogs.
See also
Class Hierarchy¶
Methods Summary¶
Constructor. |
|
Decodes the given string, which should be in the same format returned by wx.ToString , and sets the internal colours. |
|
Indicates whether the colour dialog will display alpha values and an opacity selector. |
|
Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls. |
|
Gets the current colour associated with the colour dialog. |
|
Returns custom colours associated with the colour dialog. |
|
Tells the colour dialog to show alpha values and an opacity selector (slider). |
|
Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls. |
|
Sets the default colour for the colour dialog. |
|
Sets custom colours for the colour dialog. |
|
Converts the colours saved in this class in a string form, separating the various colours with a comma. |
Properties Summary¶
See |
|
See |
|
Class API¶
- class wx.ColourData(Object)¶
Possible constructors:
ColourData() -> None
This class holds a variety of information related to colour dialogs.
Methods¶
- __init__(self)¶
Constructor.
Initializes the custom colours to
NullColour
, the data colour setting to black, and the choose full setting toTrue
.- Return type:
None
- FromString(self, str)¶
Decodes the given string, which should be in the same format returned by wx.ToString , and sets the internal colours.
- Parameters:
str (string)
- Return type:
bool
- GetChooseAlpha(self)¶
Indicates whether the colour dialog will display alpha values and an opacity selector.
It is meaningful under wxGTK, wxOSX and with regards to generic colour dialog.
The default value is
False
, except wxOSX where it isTrue
(for the sake of backward compatibility).- Return type:
bool
- GetChooseFull(self)¶
Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls.
Has no meaning under other platforms.
The default value is
True
.- Return type:
bool
- GetColour(self)¶
Gets the current colour associated with the colour dialog.
The default colour is black.
- Return type:
- GetCustomColour(self, i)¶
Returns custom colours associated with the colour dialog.
- Parameters:
i (int) – An integer between 0 and 15, being any of the 15 custom colours that the user has saved. The default custom colours are invalid colours.
- Return type:
- SetChooseAlpha(self, flag)¶
Tells the colour dialog to show alpha values and an opacity selector (slider).
Currently it has effect under wxGTK, wxOSX and for generic colour dialog.
The default value is
False
, except wxOSX where it isTrue
for backward compatibility.- Parameters:
flag (bool)
- Return type:
None
- SetChooseFull(self, flag)¶
Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls.
Under other platforms, has no effect.
The default value is
True
.- Parameters:
flag (bool)
- Return type:
None
- SetColour(self, colour)¶
Sets the default colour for the colour dialog.
The default colour is black.
- Parameters:
colour (wx.Colour)
- Return type:
None
- SetCustomColour(self, i, colour)¶
Sets custom colours for the colour dialog.
- Parameters:
i (int) – An integer between 0 and 15 for whatever custom colour you want to set. The default custom colours are invalid colours.
colour (wx.Colour) – The colour to set
- Return type:
None
- ToString(self)¶
Converts the colours saved in this class in a string form, separating the various colours with a comma.
- Return type:
str
Properties¶
- ChooseAlpha¶
See
GetChooseAlpha
andSetChooseAlpha
- ChooseFull¶
See
GetChooseFull
andSetChooseFull