Page 74 - Programming the Raspberry Pi Getting Started with Python
P. 74
One particular problem you will encounter when creating a GUI is controlling what happens when
the window is resized. You will normally want to keep some widgets in the same place and at the
same size, while allowing other widgets to expand.
As an example of this, we can build a simple window like the one shown in Figure 7-6, which has a
Listbox (on the left) that stays the same size and an expandable message area (on the right) that
expands as the window is resized.
Figure 7-6 An example of resizing a window
The code for this is shown here: