phoenix_title wx.ColourData

This class holds a variety of information related to colour dialogs.


class_hierarchy Class Hierarchy

Inheritance diagram for class ColourData:

method_summary Methods Summary

__init__

Constructor.

FromString

Decodes the given string, which should be in the same format returned by wx.ToString , and sets the internal colours.

GetChooseAlpha

Indicates whether the colour dialog will display alpha values and an opacity selector.

GetChooseFull

Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls.

GetColour

Gets the current colour associated with the colour dialog.

GetCustomColour

Returns custom colours associated with the colour dialog.

SetChooseAlpha

Tells the colour dialog to show alpha values and an opacity selector (slider).

SetChooseFull

Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls.

SetColour

Sets the default colour for the colour dialog.

SetCustomColour

Sets custom colours for the colour dialog.

ToString

Converts the colours saved in this class in a string form, separating the various colours with a comma.


api Class API

class wx.ColourData(Object)

Possible constructors:

ColourData()

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 to True.



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 is True (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

wx.Colour



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

wx.Colour



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 is True for backward compatibility.

Parameters

flag (bool) –



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) –



SetColour(self, colour)

Sets the default colour for the colour dialog.

The default colour is black.

Parameters

colour (wx.Colour) –



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



ToString(self)

Converts the colours saved in this class in a string form, separating the various colours with a comma.

Return type

string


Properties

ChooseAlpha

See GetChooseAlpha and SetChooseAlpha



ChooseFull

See GetChooseFull and SetChooseFull



Colour

See GetColour and SetColour