fsleyes_widgets.colourbutton
This module provides the ColourButton class, a button which
allows the user to select a RGBA colour.
- class fsleyes_widgets.colourbutton.ColourButton(parent, size=None, colour=None)[source]
 Bases:
ButtonA
wx.Buttonwhich allows the user to select a colour.The currently selected colour is displayed as a bitmap on the button. When the user presses the button, a
wx.ColourDialogis displayed, allowing the user to change the colour. When the user does so, aEVT_COLOUR_BUTTON_EVENTis generated.This class provides an alternative to the
wx.ColourPickerCtrl, which is a bit inflexible w.r.t. sizing/automatic resizing.Create a
ColourButton.- Parameters:
 parent – A
wxparent window.size – A tuple containing the
(width, height)of the colour bitmap in pixels. Defaults to(32, 32).colour – Initial colour. Defaults to black.
- fsleyes_widgets.colourbutton.EVT_COLOUR_BUTTON_EVENT = <wx.core.PyEventBinder object>
 Identifier for the
ColourButtonEvent.
- fsleyes_widgets.colourbutton.ColourButtonEvent
 Event emitted by a
ColourButtonwhen the user changes the selected colour.