A ToolBar
object provides a quick visual way to display a series of icons that allow actions in the application to be performed by clicking on an icon associated with the desired task. A ToolBar
object provides a functionality very similar to Menu
, but it is most often displayed to the user and predominantly uses icons for identification instead of text. In this recipe, we will look at how to set up a ToolBar
object on a Frame
object by extending the Editor
class from an earlier recipe in this chapter.
This recipe will use the code from the Exploring menus and shortcuts recipe as a base to build the additional use of a ToolBar
upon.
You need to perform the following steps:
Much as we did in the Exploring menus and shortcuts recipe, we will start by making a simple wrapper class around the
ToolBar
object to automatically apply bitmaps when possible using the following code:class EasyToolBar(wx.ToolBar): def AddEasyTool(self, id, label=""):...