Allingn controls wxPython

Discussion in 'Python' started by SMALLp, Dec 15, 2007.

  1. SMALLp

    SMALLp Guest

    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!
     
    SMALLp, Dec 15, 2007
    #1
    1. Advertising

  2. On Dec 15, 10:14 pm, SMALLp <-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
     
    Frank Millman, Dec 16, 2007
    #2
    1. Advertising

  3. SMALLp

    Guest

    On Dec 15, 2:14 pm, SMALLp <-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-Close-Look-at-wxPython-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
     
    , Dec 16, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anand
    Replies:
    1
    Views:
    366
    Cliff Wells
    Jul 23, 2003
  2. ulysses
    Replies:
    4
    Views:
    802
    Werner Schiendl
    Oct 22, 2003
  3. Logan
    Replies:
    5
    Views:
    789
    David Bolen
    Dec 11, 2003
  4. Ruben Charles
    Replies:
    6
    Views:
    513
    =?ISO-8859-1?Q?Michael_Str=F6der?=
    Oct 25, 2005
  5. Robin Dunn
    Replies:
    0
    Views:
    542
    Robin Dunn
    Mar 28, 2006
Loading...

Share This Page