How to refine this wxpython code to make the GUI look better?

Hello all,

I’m new to wxPython, and wrote a simple program using wxPython, see the GUI below:

As you can see the 2 text ctrl box are not aligned, and somehow the bottom of string “DB folder” are not aligned with Browser text ctrl box on the right.

It is a simple FlexGridSizer with 4 items, see the code below, could someone tell how fix the problem? Thanks so much in advanced!! 330.gif

code.png

  • Reed

mycode.py.txt (1.1 KB)

Hi,

Hello all,

I'm new to wxPython, and wrote a simple program using wxPython, see the GUI below:

To figure things like this out you should use the WIT, see the attached code. Run it and then press "ctrl-alt-i", make sure that the "Sizer" toogle is active, then select your flexgrid sizer and click on highlight and so on.

The reason for the aligment issue is that DirBrowseButton has a border=3 which you don't do for your textctrl.

Werner

layout.py (1.18 KB)

···

On 19/12/2012 02:56, Reed Xia wrote:

Hi Werner,

Many thanks for the kind answer!!

Reed

···

On Wed, Dec 19, 2012 at 5:28 PM, Werner werner.bruhin@sfr.fr wrote:

Hi,

On 19/12/2012 02:56, Reed Xia wrote:

Hello all,

I’m new to wxPython, and wrote a simple program using wxPython, see the GUI below:

To figure things like this out you should use the WIT, see the attached code. Run it and then press “ctrl-alt-i”, make sure that the “Sizer” toogle is active, then select your flexgrid sizer and click on highlight and so on.

The reason for the aligment issue is that DirBrowseButton has a border=3 which you don’t do for your textctrl.

Werner

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en