General Design Hints

This section discusses some common-sense techniques that you can use to make designing your GUI a little easier.

Widget Layout

In almost all cases, pack is the only geometry manager you’ll need. Start by deciding what widgets you want at the top of your window. Put them in a frame, packing them from left to right. Then pack the frame against the top of the main window.

Repeat this process until all your widgets have been created.

This method works for about 95 percent of the GUIs I’ve designed. (The other 5 percent required the grid geometry manager.)

Handle Placement Then Expansion

Don’t worry about the –expand and –fill options until you have your widgets where you want them. Then go back and add in these options.

Get Perl for C Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.