Phoenix Logo

phoenix_title wx.lib.agw.pyprogress.ProgressGauge

This class provides a visual alternative for Gauge.


class_hierarchy Class Hierarchy

Inheritance diagram for class ProgressGauge:

super_classes Known Superclasses

wx.Window


method_summary Methods Summary

__init__ Default class constructor.
DrawProgress Actually draws the sliding bar.
GetFirstGradientColour Returns the first gradient colour.
GetGaugeBackground Returns the gauge background colour.
GetGaugeProportion Returns the relative proportion between the sliding bar and the
GetGaugeSteps Returns the number of steps the gauge performs before switching from
GetSecondGradientColour Returns the second gradient colour.
OnEraseBackground Handles the wx.EVT_ERASE_BACKGROUND event for ProgressGauge.
OnPaint Handles the wx.EVT_PAINT event for ProgressGauge.
SetFirstGradientColour Sets the first gradient colour.
SetGaugeBackground Sets the gauge background colour.
SetGaugeProportion Sets the relative proportion between the sliding bar and the
SetGaugeSteps Sets the number of steps the gauge performs before switching from
SetSecondGradientColour Sets the second gradient colour.
Update Updates the gauge with a new value.

api Class API



class ProgressGauge(wx.Window)

This class provides a visual alternative for Gauge.


Methods



__init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=(-1, 30))

Default class constructor.

Parameters:
  • parent – parent window. Must not be None;
  • 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.


DrawProgress(self, dc, xsize, ysize, increment)

Actually draws the sliding bar.

Parameters:
  • dc – an instance of wx.DC;
  • xsize – the width of the whole progress bar;
  • ysize – the height of the whole progress bar;
  • increment – a positive value if we are spinning from left to right, a negative one if we are spinning from right to left.


GetFirstGradientColour(self)

Returns the first gradient colour.



GetGaugeBackground(self)

Returns the gauge background colour.



GetGaugeProportion(self)

Returns the relative proportion between the sliding bar and the whole gauge.



GetGaugeSteps(self)

Returns the number of steps the gauge performs before switching from forward to backward (or vice-versa) movement.



GetSecondGradientColour(self)

Returns the second gradient colour.



OnEraseBackground(self, event)

Handles the wx.EVT_ERASE_BACKGROUND event for ProgressGauge.

Parameters:event – a EraseEvent event to be processed.

Note

This method is intentionally empty to reduce flicker.



OnPaint(self, event)

Handles the wx.EVT_PAINT event for ProgressGauge.

Parameters:event – a PaintEvent event to be processed.


SetFirstGradientColour(self, colour)

Sets the first gradient colour.

Parameters:colour – a valid wx.Colour object.


SetGaugeBackground(self, colour)

Sets the gauge background colour.

Parameters:colour – a valid wx.Colour object.


SetGaugeProportion(self, proportion)

Sets the relative proportion between the sliding bar and the whole gauge.

Parameters:proportion – a floating point number representing the relative proportion between the sliding bar and the whole gauge.


SetGaugeSteps(self, steps)

Sets the number of steps the gauge performs before switching from forward to backward (or vice-versa) movement.

Parameters:steps – the number of steps the gauge performs before switching from forward to backward (or vice-versa) movement.


SetSecondGradientColour(self, colour)

Sets the second gradient colour.

Parameters:colour – a valid wx.Colour object.


Update(self)

Updates the gauge with a new value.