December 2015
Beginner to intermediate
350 pages
6h 49m
English
We are creating reusable GUI components using Python.
In this recipe, we will keep it simple by moving our ToolTip class into its own module. Next, we will import and use it for displaying tooltips over several widgets of our GUI.
We are building on our previous code.
We will start by breaking out our ToolTip class into a separate Python module. We will slightly enhance it to pass in the control widget and the tooltip text we wish to display when we hover the mouse over the control.
We create a new Python module and place the ToolTip class code into it and then import this module into our primary module.
We then reuse the imported ToolTip class by creating several tooltips, which can be seen ...
Read now
Unlock full access