wx.lib.agw.pyprogress.ProgressGauge¶
This class provides a visual alternative for Gauge
.
Class Hierarchy¶
Known Superclasses¶
Methods Summary¶
Default class constructor. |
|
Actually draws the sliding bar. |
|
Returns the first gradient colour. |
|
Returns the gauge background colour. |
|
Returns the relative proportion between the sliding bar and the |
|
Returns the number of steps the gauge performs before switching from |
|
Returns the second gradient colour. |
|
Handles the |
|
Handles the |
|
Sets the first gradient colour. |
|
Sets the gauge background colour. |
|
Sets the relative proportion between the sliding bar and the |
|
Sets the number of steps the gauge performs before switching from |
|
Sets the second gradient colour. |
|
Updates the gauge with a new value. |
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 forProgressGauge
.- 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 forProgressGauge
.- 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.