Re: wxPython BoxSizer

2008-11-19 Thread Jamie McQuay
> > > FYI: There's a great wxPython mailing list too. Check it out > > here:http://wxpython.org/maillist.php > > thanks, i will take a look. Here is the answer i got from the mailing list (and it works) Try adding a spacer on both sides of text. i.e) box.AddStretchSpacer() box.Add(myText, 0, w

Re: wxPython BoxSizer

2008-11-19 Thread Jamie McQuay
> > Try the style=wx.CENTER like this: > > box.Add(myText,0,wx.CENTER) tried but i still get the same result. The text is either at the top of the panel (centered) or in the middle (on the left side). If i manually call CenterOnParent when the panel is resized it goes to the center but i want t

wxPython BoxSizer

2008-11-19 Thread Jamie McQuay
Simple question, i just can't make it work. I need to center a StaticText component in its parent (Panel). I want to do this with BoxSizer(s). if i use: box = wx.BoxSizer(wx.VERTICAL) #or wx.HORIZONTAL box.Add(myText,0,wx.ALIGN_CENTER) parentPanel.Sizer = box i can get it to center either ver