I am writing a wxPython application, and when I try to change the text in a StaticText object the alignment I have set goes away. It starts off centered, but after the text is changed the alignment goes back to the default, left alignment. Here is my relevant code:
#initializing
self.panel = wx.Panel(self)
self.st_RouteInfo = wx.StaticText(self.panel, label=self.route_start, style=wx.ALIGN_CENTRE)
#changing StaticText
self.st_RouteInfo.SetLabel("Put text here")
self.Update()
I'm guessing that I am forgetting something basic, as I am new with wxPython and wxWidgets. Thanks!