A gauge is a horizontal or vertical bar which shows a quantity (often time).
wx.Gauge supports two working modes: determinate and indeterminate progress.
The first is the usual working mode (see SetValue
and SetRange
) while the second can be used when the program is doing some processing but you don’t know how much progress is being done. In this case, you can periodically call the Pulse
function to make the progress bar switch to indeterminate mode (graphically it’s usually a set of blocks which move or bounce in the bar control).
wx.Gauge supports dynamic switch between these two work modes.
There are no user commands for the gauge.
This class supports the following styles:
wx.GA_HORIZONTAL
: Creates a horizontal gauge.wx.GA_VERTICAL
: Creates a vertical gauge.wx.GA_SMOOTH
: Creates smooth progress bar with one pixel wide update step (not supported by all platforms).See also
__init__ |
Default constructor. |
Create |
Creates the gauge for two-step construction. |
GetBezelFace |
Returns the width of the 3D bezel face. |
GetRange |
Returns the maximum position of the gauge. |
GetShadowWidth |
Returns the 3D shadow margin width. |
GetValue |
Returns the current position of the gauge. |
IsVertical |
Returns True if the gauge is vertical (has GA_VERTICAL style) and False otherwise. |
Pulse |
Switch the gauge to indeterminate mode (if required) and makes the gauge move a bit to indicate the user that some progress has been made. |
SetBezelFace |
Sets the 3D bezel face width. |
SetRange |
Sets the range (maximum value) of the gauge. |
SetShadowWidth |
Sets the 3D shadow width. |
SetValue |
Sets the position of the gauge. |
BezelFace |
See GetBezelFace and SetBezelFace |
Range |
See GetRange and SetRange |
ShadowWidth |
See GetShadowWidth and SetShadowWidth |
Value |
See GetValue and SetValue |
wx.
Gauge
(Control)¶Possible constructors:
Gauge()
Gauge(parent, id=ID_ANY, range=100, pos=DefaultPosition,
size=DefaultSize, style=GA_HORIZONTAL, validator=DefaultValidator,
name=GaugeNameStr)
A gauge is a horizontal or vertical bar which shows a quantity (often time).
__init__
(self, *args, **kw)¶__init__ (self)
Default constructor.
__init__ (self, parent, id=ID_ANY, range=100, pos=DefaultPosition, size=DefaultSize, style=GA_HORIZONTAL, validator=DefaultValidator, name=GaugeNameStr)
Constructor, creating and showing a gauge.
Parameters: |
|
---|
See also
Create
(self, parent, id=ID_ANY, range=100, pos=DefaultPosition, size=DefaultSize, style=GA_HORIZONTAL, validator=DefaultValidator, name=GaugeNameStr)¶Creates the gauge for two-step construction.
See wx.Gauge for further details.
Parameters: |
|
---|---|
Return type: | bool |
GetBezelFace
(self)¶Returns the width of the 3D bezel face.
Return type: | int |
---|
Note
This method is not implemented (returns 0) for most platforms.
See also
GetShadowWidth
(self)¶Returns the 3D shadow margin width.
Return type: | int |
---|
Note
This method is not implemented (returns 0) for most platforms.
See also
IsVertical
(self)¶Returns True
if the gauge is vertical (has GA_VERTICAL
style) and False
otherwise.
Return type: | bool |
---|
Pulse
(self)¶Switch the gauge to indeterminate mode (if required) and makes the gauge move a bit to indicate the user that some progress has been made.
SetBezelFace
(self, width)¶Sets the 3D bezel face width.
Parameters: | width (int) – |
---|
Note
This method is not implemented (doesn’t do anything) for most platforms.
See also
SetRange
(self, range)¶Sets the range (maximum value) of the gauge.
This function makes the gauge switch to determinate mode, if it’s not already.
When the gauge is in indeterminate mode, under wxMSW the gauge repeatedly goes from zero to range and back; under other ports when in indeterminate mode, the range setting is ignored.
Parameters: | range (int) – |
---|
See also
SetShadowWidth
(self, width)¶Sets the 3D shadow width.
Parameters: | width (int) – |
---|
Note
This method is not implemented (doesn’t do anything) for most platforms.
SetValue
(self, pos)¶Sets the position of the gauge.
The pos must be between 0 and the gauge range as returned by GetRange
, inclusive.
This function makes the gauge switch to determinate mode, if it was in indeterminate mode before.
Parameters: | pos (int) – Position for the gauge level. |
---|
See also
BezelFace
¶See GetBezelFace
and SetBezelFace
ShadowWidth
¶See GetShadowWidth
and SetShadowWidth