I'm having difficulty centering the text inside wx.TextCtrl (as shown in the image below). โFor some reason, he always prints LEFT, not CENTERED.โ

Can someone tell me the right โstylesโ or tell me what I'm doing wrong?
import wx class SimplePanel(wx.Panel): def __init__(self, parent, id): wx.Panel.__init__(self, parent, id, style=wx.BORDER_SUNKEN) myTextCtrl = wx.TextCtrl(self, -1, style=wx.TE_CENTRE, size=(100, -1), pos=(10, 10)) if __name__ == '__main__': app = wx.App() frame = wx.Frame(None, -1, 'Simple Panel') myPanel = SimplePanel(frame, -1) frame.Show() app.MainLoop()
source share