AGW Logo

agw_title PieCtrlLegend

This class displays a legend window for the classic PieCtrl.

hierarchy Inheritance Diagram

Inheritance diagram for: PieCtrlLegend

Inheritance diagram of PieCtrlLegend


method_summary Methods Summary

__init__Default class constructor.
GetBackColourReturns the legend background colour.
GetHorizontalBorderReturns the legend’s horizontal border, in pixels.
GetLabelColourReturns the legend label colour.
GetLabelFontReturns the legend label font.
GetVerticalBorderReturns the legend’s vertical border, in pixels.
IsTransparentReturns whether the legend background is transparent or not.
OnPaintHandles the wx.EVT_PAINT event for PieCtrlLegend.
RecreateBackgroundRecreates the legend background.
SetBackColourSets the legend background colour.
SetHorizontalBorderSets the legend’s horizontal border.
SetLabelColourSets the legend label colour.
SetLabelFontSets the legend label font.
SetTransparentToggles the legend transparency (visibility).
SetVerticalBorderSets the legend’s vertical border.

API Class API

class PieCtrlLegend(wx.Window)[source]

This class displays a legend window for the classic PieCtrl.



__init__(parent, title, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0)[source]

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()[source]

Returns the legend background colour.



GetHorizontalBorder()[source]

Returns the legend’s horizontal border, in pixels.



GetLabelColour()[source]

Returns the legend label colour.



GetLabelFont()[source]

Returns the legend label font.



GetVerticalBorder()[source]

Returns the legend’s vertical border, in pixels.



IsTransparent()[source]

Returns whether the legend background is transparent or not.



OnPaint(event)[source]

Handles the wx.EVT_PAINT event for PieCtrlLegend.

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


RecreateBackground(parentdc)[source]

Recreates the legend background.

Parameters:parentdc – an instance of wx.DC.


SetBackColour(colour)[source]

Sets the legend background colour.

Parameters:colour – a valid wx.Colour object.


SetHorizontalBorder(value)[source]

Sets the legend’s horizontal border.

Parameters:value – the horizontal border thickness, in pixels.


SetLabelColour(colour)[source]

Sets the legend label colour.

Parameters:colour – a valid wx.Colour object.



SetLabelFont(font)[source]

Sets the legend label font.

Parameters:font – a valid wx.Font object.


SetTransparent(value=False)[source]

Toggles the legend transparency (visibility).

Parameters:valueTrue to set the legend as transparent, False otherwise.


SetVerticalBorder(value)[source]

Sets the legend’s vertical border.

Parameters:value – the horizontal border thickness, in pixels.
Tree

Table Of Contents

Previous topic

PieCtrl

Next topic

PiePart