wx.lib.colourchooser.pycolourbox.PyColourBox¶
A Colour Selection Box
The Colour selection box implements button like behavior but contains a solid-filled, coloured sub-box. Placing the colour in a sub-box allows for filling in the main panel’s background for a high-lighting effect.
Class Hierarchy¶
Known Superclasses¶
Methods Summary¶
Creates a new colour box instance and initializes the colour |
|
Returns a wxColour object indicating the box’s current colour. |
|
Returns a reference to the internal box object containing the |
|
Accepts a wxColour object and sets the box’s current color. |
|
Sets the box’s current couple to the given tuple. |
|
Accepts a boolean ‘val’ toggling the box’s highlighting. |
|
Update() -> None |
Class API¶
- class PyColourBox(wx.Panel)¶
A Colour Selection Box
The Colour selection box implements button like behavior but contains a solid-filled, coloured sub-box. Placing the colour in a sub-box allows for filling in the main panel’s background for a high-lighting effect.
Methods¶
- __init__(self, parent, id, colour=(0, 0, 0), size=(25, 20))¶
Creates a new colour box instance and initializes the colour content.
- GetColour(self)¶
Returns a wxColour object indicating the box’s current colour.
- GetColourBox(self)¶
Returns a reference to the internal box object containing the color. This function is useful for setting up event handlers for the box.
- SetColour(self, colour)¶
Accepts a wxColour object and sets the box’s current color.
- SetColourTuple(self, colour)¶
Sets the box’s current couple to the given tuple.
- SetHighlight(self, val)¶
Accepts a boolean ‘val’ toggling the box’s highlighting.
- Update(self)¶
Update() -> None
Immediately repaints the invalidated area of the window and all of its children recursively.