AGW Logo

agw_title ColourPanel

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

hierarchy Inheritance Diagram

Inheritance diagram for: ColourPanel

Inheritance diagram of ColourPanel


method_summary Methods Summary

__init__Default class constructor.
AcceptsFocusCan this window be given focus by mouse click? ..
AcceptsFocusFromKeyboardCan this window be given focus by keyboard navigation? If not, the
OnEraseBackgroundHandles the wx.EVT_ERASE_BACKGROUND for ColourPanel.
OnPaintHandles the wx.EVT_PAINT for ColourPanel.
OnSizeHandles the wx.EVT_SIZE for ColourPanel.
RefreshColourRefresh the panel after a colour/alpha change.

API Class API

class ColourPanel(wx.PyPanel)[source]

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



__init__(parent, style=wx.SIMPLE_BORDER)[source]

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

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


AcceptsFocus()[source]

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 wx.PyPanel.



AcceptsFocusFromKeyboard()[source]

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 wx.PyPanel.



OnEraseBackground(event)[source]

Handles the wx.EVT_ERASE_BACKGROUND for ColourPanel.

Parameters:event – a wx.EraseEvent event to be processed.

Note

This is intentionally empty to reduce flicker.



OnPaint(event)[source]

Handles the wx.EVT_PAINT for ColourPanel.

Parameters:event – a wx.PaintEvent event to be processed.


OnSize(event)[source]

Handles the wx.EVT_SIZE for ColourPanel.

Parameters:event – a wx.SizeEvent event to be processed.


RefreshColour(colour)[source]

Refresh the panel after a colour/alpha change.

Parameters:colour – the new background colour of ColourPanel.
Tree

Table Of Contents

Previous topic

Colour

Next topic

CubeColourDialog