ColourPickerPanel
Based on StylePickerPanel, a Panel for selecting a list of colours, and their order
Classes:
|
Based on StylePickerPanel, a Panel for selecting a list of colours, and their order. |
-
class
ColourPickerPanel
(parent, id=- 1, pos=(- 1, - 1), size=(- 1, - 1), style=524288, name=b'panel', label='Choose Colours: ', picker_choices=None, selection_choices=None)[source] Bases:
StylePickerPanel
Based on StylePickerPanel, a Panel for selecting a list of colours, and their order.
- Parameters
parent (
Window
) – The parent window.id (
int
) – An identifier for the panel. wx.ID_ANY is taken to mean a default. Default-1
.pos (
Point
) – The panel position. The valuewx.DefaultPosition
indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform. Default(-1, -1)
.size (
Size
) – The panel size. The valuewx.DefaultSize
indicates a default size, chosen by either the windowing system or wxWidgets, depending on platform. Default(-1, -1)
.style (
int
) – The window style. See wxPanel. Default524288
.name (
str
) – The window name. Defaultb'panel'
.label (
str
) – Label for the panel. Default'Choose Colours: '
.picker_choices (
Optional
[List
[str
]]) – A list of hex value choices to populate the ‘picker’ side of the panel with. DefaultNone
.selection_choices (
Optional
[List
[str
]]) – A list of hex value choices to populate the ‘selection’ side of the panel with. DefaultNone
.
Methods:
Returns a list of the currently selected colours
add
(event)Event handler for adding the colour currently selected in the ‘picker’ to the ‘selection’
Returns a list of the currently selected colours
pick
(*args)Open a
wx.ColourDialog
to edit the colour currently selected in the picker.remove
(event)Event handler for removing the colour currently selected in the ‘selection’
update_preview
(list_obj, axes)Update the preview from the given list.
-
add
(event)[source] Event handler for adding the colour currently selected in the ‘picker’ to the ‘selection’
-
pick
(*args)[source] Open a
wx.ColourDialog
to edit the colour currently selected in the picker.