AGW Logo

agw_title ProgressGauge

This class provides a visual alternative for wx.Gauge.

hierarchy Inheritance Diagram

Inheritance diagram for: ProgressGauge

Inheritance diagram of ProgressGauge


method_summary Methods Summary

__init__Default class constructor.
DrawProgressActually draws the sliding bar.
GetFirstGradientColourReturns the first gradient colour.
GetGaugeBackgroundReturns the gauge background colour.
GetGaugeProportionReturns the relative proportion between the sliding bar and the
GetGaugeStepsReturns the number of steps the gauge performs before switching from
GetSecondGradientColourReturns the second gradient colour.
OnEraseBackgroundHandles the wx.EVT_ERASE_BACKGROUND event for ProgressGauge.
OnPaintHandles the wx.EVT_PAINT event for ProgressGauge.
SetFirstGradientColourSets the first gradient colour.
SetGaugeBackgroundSets the gauge background colour.
SetGaugeProportionSets the relative proportion between the sliding bar and the whole gauge.
SetGaugeStepsSets the number of steps the gauge performs before switching from forward to backward (or vice-versa) movement.
SetSecondGradientColourSets the second gradient colour.
UpdateUpdates the gauge with a new value.

API Class API

class ProgressGauge(wx.PyWindow)[source]

This class provides a visual alternative for wx.Gauge.



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

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(dc, xsize, ysize, increment)[source]

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

Returns the first gradient colour.



GetGaugeBackground()[source]

Returns the gauge background colour.



GetGaugeProportion()[source]

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



GetGaugeSteps()[source]

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



GetSecondGradientColour()[source]

Returns the second gradient colour.



OnEraseBackground(event)[source]

Handles the wx.EVT_ERASE_BACKGROUND event for ProgressGauge.

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

Note

This method is intentionally empty to reduce flicker.



OnPaint(event)[source]

Handles the wx.EVT_PAINT event for ProgressGauge.

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


SetFirstGradientColour(colour)[source]

Sets the first gradient colour.

Parameters:colour – a valid wx.Colour object.


SetGaugeBackground(colour)[source]

Sets the gauge background colour.

Parameters:colour – a valid wx.Colour object.



SetGaugeProportion(proportion)[source]

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

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

Sets the second gradient colour.

Parameters:colour – a valid wx.Colour object.



Update()[source]

Updates the gauge with a new value.

Tree

Table Of Contents

Previous topic

pyprogress

Next topic

PyProgress