Table Of Contents

Previous topic

Colour

Next topic

CubeColourDialog

This Page

phoenix_title ColourPanel

Simple custom class used to display “old” and “new” colour panels, with alpha blending capabilities.


class_hierarchy Inheritance Diagram

Inheritance diagram for class ColourPanel

Inheritance diagram of ColourPanel


super_classes Known Superclasses

PyPanel


method_summary Methods Summary

__init__ Default class constructor.
AcceptsFocus Can this window be given focus by mouse click?
AcceptsFocusFromKeyboard Can this window be given focus by keyboard navigation? If not, the
OnEraseBackground Handles the EVT_ERASE_BACKGROUND for ColourPanel.
OnPaint Handles the EVT_PAINT for ColourPanel.
OnSize Handles the EVT_SIZE for ColourPanel.
RefreshColour Refresh the panel after a colour/alpha change.

api Class API



class ColourPanel(PyPanel)

Simple custom class used to display “old” and “new” colour panels, with alpha blending capabilities.


Methods



__init__(self, parent, style=SIMPLE_BORDER)

Default class constructor. Used internally. Do not call it in your code!

Parameters:
  • parent – the control parent window;
  • style – the ColourPanel window style.


AcceptsFocus(self)

Can this window be given focus by mouse click?

Note

This method always returns False as we do not accept focus from mouse click.

Note

Overridden from PyPanel.



AcceptsFocusFromKeyboard(self)

Can this window be given focus by keyboard navigation? If not, the only way to give it focus (provided it accepts it at all) is to click it.

Note

This method always returns False as we do not accept focus from the keyboard.

Note

Overridden from PyPanel.



OnEraseBackground(self, event)

Handles the EVT_ERASE_BACKGROUND for ColourPanel.

Parameters:event – a EraseEvent event to be processed.

Note

This is intentionally empty to reduce flicker.



OnPaint(self, event)

Handles the EVT_PAINT for ColourPanel.

Parameters:event – a PaintEvent event to be processed.


OnSize(self, event)

Handles the EVT_SIZE for ColourPanel.

Parameters:event – a SizeEvent event to be processed.


RefreshColour(self, colour)

Refresh the panel after a colour/alpha change.

Parameters:colour – the new background colour of ColourPanel.