Developing GUIs with wxPython (Part 4)

What Can wxPython Do?

wxPython is a stable, mature graphical library. As such, it has widgets for nearly everything you plan on creating. Generally speaking, if you can’t do it with wxPython, you’ll probably have to create a custom GUI, such as used in video games.

I won’t cover everything wxPython can do for you; looking through the demonstration code that comes with wxPython will show you all the current widgets included in the toolkit. The demonstration also shows the source code in an interactive environment; you can test different ideas within the demonstration code and see what happens to the resulting GUI.

wxPython has several standard, built-in frames and dialogs. Frames include a multiple document interface (having files of the same type contained within the parent window, rather than separate windows) and a wizard class for making simple user walk-throughs.

Included dialogs range from simple “About” boxes and file selections to color pickers and print dialogs. Simple modifications to the source code makes them plug & play-ready for your application.

The main group of objects you will be using are the core widgets and controls. These are what you will use to build your GUI. This category includes things like buttons, check boxes, radio buttons, list boxes, menus, labels, and text boxes. As before, the wxPython demo shows how to use these items.

There are also many different tools shown in the wxPython demo. Most of them you will probably never use, but it’s nice to know wxPython includes them and there is some source code for you to work with.

One thing I’ve noticed, however, is that the sample demonstrations don’t always show how to best to use the widgets. For example, the wizard demo certainly displays a simple wizard with previous/next buttons. But it doesn’t have any functionality, such as accepting input from the user for file names or dynamically changing the data displayed. This makes it extremely difficult to make your applications work well if you are coding off the beaten path, for example writing your program without the help of wxGlade or incorporating many different widgets into a program.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s