ColourPickerPanel

Based on StylePickerPanel, a Panel for selecting a list of colours, and their order

Classes:

ColourPickerPanel(parent[, id, pos, size, …])

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 value wx.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 value wx.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. Default 524288.

  • name (str) – The window name. Default b'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. Default None.

  • selection_choices (Optional[List[str]]) – A list of hex value choices to populate the ‘selection’ side of the panel with. Default None.

Methods:

GetSelection()

Returns a list of the currently selected colours

add(event)

Event handler for adding the colour currently selected in the ‘picker’ to the ‘selection’

get_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.

GetSelection()[source]

Returns a list of the currently selected colours

Return type

List[str]

add(event)[source]

Event handler for adding the colour currently selected in the ‘picker’ to the ‘selection’

get_selection()

Returns a list of the currently selected colours

Return type

List[str]

pick(*args)[source]

Open a wx.ColourDialog to edit the colour currently selected in the picker.

remove(event)[source]

Event handler for removing the colour currently selected in the ‘selection’

update_preview(list_obj, axes)[source]

Update the preview from the given list.

Parameters
  • list_obj (ListBox) – The list to update the preview for.

  • axes (Axes) – The preview axes to update.