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.
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() |
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.
__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()
Calling this method immediately repaints the invalidated area of the window and all of its children recursively (this normally only happens when the flow of control returns to the event loop).