The StatusBar
is a common component found in many applications for the display of short information messages at the bottom of the main windows content area. The standard StatusBar
supports the display of multiple status text fields. This recipe shows how to create an advanced StatusBar
that has a Gauge
built-in to it in order to show progress during long-running tasks. Just as a sneak peak of what we are going to create, take a look at the following screenshot to see the ProgressStatusBar
in action:
First, we will create our ProgressStatusBar
class by creating a subclass of StatusBar
. In the constructor, we create the Gauge
for showing the progress and a Timer
to use for updating the Gauge
:
class ProgressStatusBar(wx.StatusBar): """Custom StatusBar with a built-in progress bar""" def __init__(self, parent, id_=wx.ID_ANY, style=wx.SB_FLAT, name="ProgressStatusBar"): super(ProgressStatusBar, self...