Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Allingn controls wxPython

Reply
Thread Tools

Allingn controls wxPython

 
 
SMALLp
Guest
Posts: n/a
 
      12-15-2007
Hy. I need help. I'm using BoxSizer and i put TextCtrl and StaticText
next to each other and they gor alligned by top of TextCtrl and it looks
terrible. How can i make thm to be alligned by center of each controll.

Thnaks!
 
Reply With Quote
 
 
 
 
Frank Millman
Guest
Posts: n/a
 
      12-16-2007
On Dec 15, 10:14 pm, SMALLp <(E-Mail Removed)-com.hr> wrote:
> Hy. I need help. I'm using BoxSizer and i put TextCtrl and StaticText
> next to each other and they gor alligned by top of TextCtrl and it looks
> terrible. How can i make thm to be alligned by center of each controll.
>
> Thnaks!


Use the flag wx.ALIGN_CENTRE_VERTICAL when adding the controls to the
sizer.

If you have a number of StaticText/TextCtrl pairs, and you want them
to line up underneath each other, use a FlexGridSizer or a
GridBagSizer.

Frank Millman
 
Reply With Quote
 
 
 
 
kyosohma@gmail.com
Guest
Posts: n/a
 
      12-16-2007
On Dec 15, 2:14 pm, SMALLp <(E-Mail Removed)-com.hr> wrote:
> Hy. I need help. I'm using BoxSizer and i put TextCtrl and StaticText
> next to each other and they gor alligned by top of TextCtrl and it looks
> terrible. How can i make thm to be alligned by center of each controll.
>
> Thnaks!


A shortcut flag is to just use wx.CENTER. You might find this wiki
entry useful:

http://wiki.wxpython.org/UsingSizers

This article may be fruitful as well:

http://www.devshed.com/c/a/Python/A-...thon-Controls/

I personally use the wxPython in Action book by Dunn quite a bit. It's
got lots of information, although it's not well organized.

Mike
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[wxPython-users] ANNOUNCE: wxPython 2.6.3.0 Robin Dunn Python 0 03-28-2006 06:03 PM
[wxPython-users] Web based applications are possible with wxPython? Ruben Charles Python 6 10-25-2005 09:41 PM
wxPython - wx package (new style wxPython?) Logan Python 5 12-11-2003 04:12 PM
[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt ulysses Python 4 10-22-2003 03:28 PM
wxPython looses function "wxPython.wx.miscc" Anand Python 1 07-23-2003 01:59 AM



Advertisments