Wxpython: Text Alignment Does Not Work
For some reasons the wx.ALIGN_* does not align anything on Ubuntu, while it works on Mac OS X: self.static_text = wx.StaticText(self, -1, 'hello, world', pos=(0,0),
Solution 1:
I have test this code snippet in Win 7 environment, one error is surfaced about the argument usage: SyntaxError: non-keyword arg after keyword arg
self.static_text = wx.StaticText(self, -1, 'hello, world', pos=(0,0), size=(300,30), style = wx.ALIGN_CENTER)
Cause you have used two keyword args ("pos" and "size") in front of wx.ALIGN_CENTER, which is non-keyword arg. I guess that change wx.ALIGN_CENTER into style = wx.ALIGN_CENTER may solve your problem ?
Post a Comment for "Wxpython: Text Alignment Does Not Work"