boxsizer inside a panel

Discussion in 'Python' started by Gandalf, Aug 30, 2008.

  1. Gandalf

    Gandalf Guest

    the following code's panel elements doesn't react like a table though
    is haze boxsizer
    What is wrong here? :


    panel3=wx.Panel(self,-1,(10,10), style=wx.SIMPLE_BORDER,
    size=(370, 150))
    panel3.SetBackgroundColour("#ffffff")
    text1=wx.StaticText(panel3, -1, 'Hello')
    text2=wx.StaticText(panel3, -1, 'text text text
    text')
    box = wx.BoxSizer(wx.HORIZONTAL)

    box.Add(text1, 1, wx.ALIGN_LEFT)
    box.Add(text2, 1, wx.ALIGN_RIGHT)

    self.SetAutoLayout(True)
    panel3.SetSizer(box)


    self.Layout()


    thanks!
     
    Gandalf, Aug 30, 2008
    #1
    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. HS1
    Replies:
    3
    Views:
    514
  2. HS1
    Replies:
    4
    Views:
    8,357
    Babu Kalakrishnan
    Dec 8, 2004
  3. Laszlo Zsolt Nagy

    wx.BoxSizer problem

    Laszlo Zsolt Nagy, Jan 21, 2005, in forum: Python
    Replies:
    0
    Views:
    312
    Laszlo Zsolt Nagy
    Jan 21, 2005
  4. Gandalf
    Replies:
    2
    Views:
    579
    Gandalf
    Aug 22, 2008
  5. Jamie McQuay

    wxPython BoxSizer

    Jamie McQuay, Nov 19, 2008, in forum: Python
    Replies:
    4
    Views:
    1,361
    Mike Driscoll
    Nov 19, 2008
Loading...

Share This Page