This panel displays a series of custom colours (chosen by the user) just like the standard wx.ColourDialog.
__init__ | Default class constructor. |
AddCustom | Adds a user-chosen colour to the list of custom colours. |
DoGetBestSize | Overridden base class virtual. |
InitializeColours | Initializes the 16 custom colours in CustomPanel. |
OnEraseBackground | Handles the wx.EVT_ERASE_BACKGROUND for CustomPanel. |
OnLeftDown | Handles the wx.EVT_LEFT_DOWN for CustomPanel. |
OnPaint | Handles the wx.EVT_PAINT for CustomPanel. |
OnSize | Handles the wx.EVT_SIZE for CustomPanel. |
PaintCustomColour | Paints a newly added custom colour subpanel. |
PaintCustomColours | Draws all the 16 subpanels with their custom colours. |
PaintHighlight | Highlight the current custom colour selection (if any). |
This panel displays a series of custom colours (chosen by the user) just like the standard wx.ColourDialog.
Default class constructor. Used internally. Do not call it in your code!
Parameters: |
|
---|
Adds a user-chosen colour to the list of custom colours.
Parameters: | colour – an instance of wx.Colour. |
---|
Overridden base class virtual. Determines the best size of the control.
Note
Overridden from wx.PyControl.
Initializes the 16 custom colours in CustomPanel.
Handles the wx.EVT_ERASE_BACKGROUND for CustomPanel.
Parameters: | event – a wx.EraseEvent event to be processed. |
---|
Note
This is intentionally empty to reduce flicker.
Handles the wx.EVT_LEFT_DOWN for CustomPanel.
Parameters: | event – a wx.MouseEvent event to be processed. |
---|
Handles the wx.EVT_PAINT for CustomPanel.
Parameters: | event – a wx.PaintEvent event to be processed. |
---|
Handles the wx.EVT_SIZE for CustomPanel.
Parameters: | event – a wx.SizeEvent event to be processed. |
---|
Paints a newly added custom colour subpanel.
Parameters: |
|
---|
Draws all the 16 subpanels with their custom colours.
Parameters: | dc – an instance of wx.DC. |
---|