title: Changing wx.TextCtrl style flags dynamically
body: <p>I have this code on my project. what i would like to do is:</p>
  
  <ol>
  <li>Make the text field read only so no one can type in it.</li>
  <li>Append the text to the field via button event</li>
  <li>If wrong button is pressed and the wrong value is appended, press the right button to overwrite the text field.</li>
  </ol>
  
  <p>I don't think this will work because my text field is already in a read only format.
  Is there a way to change the style flags dynamically or what can i do?</p>
  
  <p>In other words, how can i overwrite value of a read only field?</p>
  
  <pre><code>def trig_dir(e):
          self.text.Clear()
          dialog = wx.DirDialog(None, "Choose a directory:",style=wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON)
  
          if dialog.ShowModal() == wx.ID_OK:
              global boxstat
              boxstat+=dialog.GetPath()
  
          self.text.AppendText(boxstat)
          dialog.Destroy()
  </code></pre>
  
  <p>if a user changes their mind, this function runs again.</p>