title: trouble getting wx.TextCtrl contents to re-center on resize
body: <p>I have a TextCtrl with style=wx.TE_CENTRE, and I want/expect its contents to remain centered when I resize the TextCtrl. However, the text stays on the left side of the TextCtrl.</p>
  
  <pre><code>import wx
  
  class MyApp(wx.App):
      def OnInit(self):
          frame = wx.Frame(None)
          frame.Show(True)
          self.SetTopWindow(frame)
          self.myText = wx.TextCtrl(frame, value="A", style=wx.TE_CENTRE)
  
          sizer = wx.BoxSizer(wx.HORIZONTAL)
          sizer.Add(self.myText, wx.EXPAND)
  
          frame.SetSizer(sizer)
          sizer.Fit(frame)
  
          self.Bind(wx.EVT_SIZE, self.OnSize)
          return True
  
      def OnSize(self, evt):
          self.myText.SetValue("after resize")
  
  myApp = MyApp(0)
  myApp.MainLoop()
  </code></pre>
  
  <p>After a lot of trial and error, I got it to work by doing <em>both</em> of the following:</p>
  
  <ul>
  <li>Refresh the TextCtrl in my wx.EVT_SIZE handler</li>
  <li>Add the style wx.TE_RICH to the TextCtrl</li>
  </ul>
  
  <p>Why are both of these necessary? I'd like to understand what I'm doing wrong here.
  (I'm using wxPython 4.0.4 on Win7.)</p>