title: wxpython change text after function call
body: <p>On click of my "browse" button, the text in my textbox "tc1" does not change. I get a console error of "global name 'tc1' is not defined". I just want the text of tc1 to change when I click button1</p>
  
  <p>python:</p>
  
  <pre><code>def InitUI(self):
  
    panel = wx.Panel(self)
  
    button1 = wx.Button(panel, label="Browse...")
    button1.Bind(wx.EVT_BUTTON, self.OnBrowse)
  
    tc1 = wx.TextCtrl(panel, -1, "Text")
  
  def OnBrowse(self, event):
    return tc1.SetValue("New Text")
  </code></pre>