This class provides a visual alternative for wx.Gauge. It currently only support determinate mode (see SetValue and SetRange)
__init__ | Default class constructor. |
DoGetBestSize | Gets the size which best suits PyGauge: for a control, it would be |
GetBarColor | Returns the PyGauge main bar colour. |
GetBarColour | Returns the PyGauge main bar colour. |
GetBarGradient | Returns a tuple containing the gradient start and end colours. |
GetBorderColor | Returns the PyGauge border colour. |
GetBorderColour | Returns the PyGauge border colour. |
GetBorderPadding | Gets the border padding. |
GetRange | Returns the maximum value of the gauge. |
GetValue | Returns the current position of the gauge. |
OnEraseBackground | Handles the wx.EVT_ERASE_BACKGROUND event for PyGauge. |
OnPaint | Handles the wx.EVT_PAINT event for PyGauge. |
OnTimer | Handles the wx.EVT_TIMER event for PyGauge. |
SetBarColor | Sets the PyGauge main bar colour. |
SetBarColour | Sets the PyGauge main bar colour. |
SetBarGradient | Sets the bar gradient. |
SetBorderColor | Sets the PyGauge border colour. |
SetBorderColour | Sets the PyGauge border colour. |
SetBorderPadding | Sets the border padding. |
SetRange | Sets the range of the gauge. |
SetValue | Sets the current position of the gauge. |
SortForDisplay | Internal method which sorts things so we draw the longest bar first. |
Update | Update the gauge by adding value to it over time milliseconds. |
This class provides a visual alternative for wx.Gauge. It currently only support determinate mode (see PyGauge.SetValue() and PyGauge.SetRange())
Default class constructor.
Parameters: |
|
---|
Gets the size which best suits PyGauge: for a control, it would be the minimal size which doesn’t truncate the control, for a panel - the same size as it would have after a call to Fit().
Note
Overridden from wx.PyWindow.
Handles the wx.EVT_ERASE_BACKGROUND event for PyGauge.
Parameters: | event – a wx.EraseEvent event to be processed. |
---|
Note
This method is intentionally empty to reduce flicker.
Handles the wx.EVT_PAINT event for PyGauge.
Parameters: | event – a wx.PaintEvent event to be processed. |
---|
Handles the wx.EVT_TIMER event for PyGauge.
Parameters: | event – a wx.TimerEvent event to be processed. |
---|
Sets the PyGauge main bar colour.
Parameters: | colour – an instance of wx.Colour. |
---|
Sets the PyGauge main bar colour.
Parameters: | colour – an instance of wx.Colour. |
---|
Sets the bar gradient.
Parameters: | gradient – a tuple containing the gradient start and end colours. |
---|
Note
This overrides the bar colour previously set with SetBarColour.
Sets the PyGauge border colour.
Parameters: | colour – an instance of wx.Colour. |
---|
Sets the PyGauge border colour.
Parameters: | colour – an instance of wx.Colour. |
---|
Sets the border padding.
Parameters: | padding – pixels between the border and the progress bar. |
---|
Sets the range of the gauge. The gauge length is its value as a proportion of the range.
Parameters: | range – The maximum value of the gauge. |
---|
Sets the current position of the gauge.
Parameters: | value – an integer specifying the current position of the gauge. |
---|