phoenix_title wx.lib.agw.piectrl.PieCtrlLegend

This class displays a legend window for the classic PieCtrl.


class_hierarchy Class Hierarchy

Inheritance diagram for class PieCtrlLegend:

super_classes Known Superclasses

wx.Window


method_summary Methods Summary

__init__

Default class constructor.

GetBackColour

Returns the legend background colour.

GetHorizontalBorder

Returns the legend’s horizontal border, in pixels.

GetLabelColour

Returns the legend label colour.

GetLabelFont

Returns the legend label font.

GetVerticalBorder

Returns the legend’s vertical border, in pixels.

IsTransparent

Returns whether the legend background is transparent or not.

OnPaint

Handles the wx.EVT_PAINT event for PieCtrlLegend.

RecreateBackground

Recreates the legend background.

SetBackColour

Sets the legend background colour.

SetHorizontalBorder

Sets the legend’s horizontal border.

SetLabelColour

Sets the legend label colour.

SetLabelFont

Sets the legend label font.

SetTransparent

Toggles the legend transparency (visibility).

SetVerticalBorder

Sets the legend’s vertical border.


api 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 for PieCtrlLegend.

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.



SetLabelFont(self, font)

Sets the legend label font.

Parameters:

font – a valid wx.Font object.



SetTransparent(self, value=False)

Toggles the legend transparency (visibility).

Parameters:

valueTrue 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.