wx.lib.agw.piectrl.PieCtrlLegend¶
This class displays a legend window for the classic PieCtrl
.
Class Hierarchy¶
Known Superclasses¶
Methods Summary¶
Default class constructor. |
|
Returns the legend background colour. |
|
Returns the legend’s horizontal border, in pixels. |
|
Returns the legend label colour. |
|
Returns the legend label font. |
|
Returns the legend’s vertical border, in pixels. |
|
Returns whether the legend background is transparent or not. |
|
Handles the |
|
Recreates the legend background. |
|
Sets the legend background colour. |
|
Sets the legend’s horizontal border. |
|
Sets the legend label colour. |
|
Sets the legend label font. |
|
Toggles the legend transparency (visibility). |
|
Sets the legend’s vertical border. |
Class API¶
- class PieCtrlLegend(wx.Window)¶
This class displays a legend window for the classic
PieCtrl
.
Methods¶
- __init__(self, parent, title, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0)¶
Default class constructor.
- Parameters:
parent – the
PieCtrlLegend
parent;title – the legend title;
id – window identifier. A value of -1 indicates a default value;
pos – the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform;
size – the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform;
style – the window style (unused).
- GetBackColour(self)¶
Returns the legend background colour.
- GetHorizontalBorder(self)¶
Returns the legend’s horizontal border, in pixels.
- GetLabelColour(self)¶
Returns the legend label colour.
- GetLabelFont(self)¶
Returns the legend label font.
- GetVerticalBorder(self)¶
Returns the legend’s vertical border, in pixels.
- IsTransparent(self)¶
Returns whether the legend background is transparent or not.
- OnPaint(self, event)¶
Handles the
wx.EVT_PAINT
event forPieCtrlLegend
.- Parameters:
event – a
PaintEvent
event to be processed.
- RecreateBackground(self, parentdc)¶
Recreates the legend background.
- Parameters:
parentdc – an instance of
wx.DC
.
- SetBackColour(self, colour)¶
Sets the legend background colour.
- Parameters:
colour – a valid
wx.Colour
object.
- SetHorizontalBorder(self, value)¶
Sets the legend’s horizontal border.
- Parameters:
value – the horizontal border thickness, in pixels.
- SetLabelColour(self, colour)¶
Sets the legend label colour.
- Parameters:
colour – a valid
wx.Colour
object.
- SetTransparent(self, value=False)¶
Toggles the legend transparency (visibility).
- Parameters:
value –
True
to set the legend as transparent,False
otherwise.
- SetVerticalBorder(self, value)¶
Sets the legend’s vertical border.
- Parameters:
value – the horizontal border thickness, in pixels.