While absolute positioning of controls may work in some odd cases, absolute positioning isn't convenient or pretty. This article will explain methods that can be used to better oganize controls in your wxPython aplications.
You probably already know how to create basic wxPython applications and position controls in them. If you don't, then this article is not for you. Take a look at A Look at wxPython.
A Few More Controls
Before we work on organizing controls, let's learn about a few more controls. Right not, we only know how to place buttons and text fields in our applications. It's difficult to make anything special with just these two controls, a menu and a few dialogs. First, let's take a look at a wxChoice control. It gives you a drop-down list of choices, which are taken from a Python list. Here's how you would make a basic wxChoice control:
Note that I passed -1 as the control's id. This is the same as passing wxID_ANY, except, of course, that it's a bit shorter.
It's not important that we stick it in an application to test it out immediately. We'll save that for a few minutes. Our next control, wxComboBox, combines wxTextCtrl with wxChoice. It allows the user to either select an item from the list or specify his or her own text. It works similar to wxChoice: