wx.lib.agw.cubecolourdialog.CustomPanel¶
This panel displays a series of custom colours (chosen by the user) just like
the standard wx.ColourDialog.
Class Hierarchy¶
Known Superclasses¶
Methods Summary¶
Default class constructor. |
|
Adds a user-chosen colour to the list of custom colours. |
|
Overridden base class virtual. Determines the best size of the control. |
|
Initializes the 16 custom colours in |
|
Handles the |
|
Handles the |
|
Handles the |
|
Handles the |
|
Paints a newly added custom colour subpanel. |
|
Draws all the 16 subpanels with their custom colours. |
|
Highlight the current custom colour selection (if any). |
Class API¶
- class CustomPanel(wx.Control)¶
This panel displays a series of custom colours (chosen by the user) just like the standard
wx.ColourDialog.
Methods¶
- __init__(self, parent, colourData)¶
Default class constructor. Used internally. Do not call it in your code!
- Parameters:
parent – the control parent window;
colourData – an instance of
wx.ColourData.
- AddCustom(self, colour)¶
Adds a user-chosen colour to the list of custom colours.
- Parameters:
colour – an instance of
wx.Colour.
- DoGetBestSize(self)¶
Overridden base class virtual. Determines the best size of the control.
Note
Overridden from
wx.Control.
- InitializeColours(self)¶
Initializes the 16 custom colours in
CustomPanel.
- OnEraseBackground(self, event)¶
Handles the
wx.EVT_ERASE_BACKGROUNDforCustomPanel.- Parameters:
event – a
EraseEventevent to be processed.
Note
This is intentionally empty to reduce flicker.
- OnLeftDown(self, event)¶
Handles the
wx.EVT_LEFT_DOWNforCustomPanel.- Parameters:
event – a
MouseEventevent to be processed.
- OnPaint(self, event)¶
Handles the
wx.EVT_PAINTforCustomPanel.- Parameters:
event – a
PaintEventevent to be processed.
- OnSize(self, event)¶
Handles the
wx.EVT_SIZEforCustomPanel.- Parameters:
event – a
wx.SizeEventevent to be processed.
- PaintCustomColour(self, dc, selX, selY)¶
Paints a newly added custom colour subpanel.
- Parameters:
dc – an instance of
wx.DC;selX – the x coordinate of the custom colour subpanel;
selY – the y coordinate of the custom colour subpanel.
- PaintCustomColours(self, dc)¶
Draws all the 16 subpanels with their custom colours.
- Parameters:
dc – an instance of
wx.DC.