title: How do I get the scroll position / range from a wx.TextCtrl control in wxPython
body: <p>I have a little logging app (written in wxPython) that receives data from a bit of kit we're developing, and I want to display the text in a scrolling window. As it stands I'm using a wx.TextCtrl for the text display, but I'm having some issues with the scrolling behaviour.</p>
  
  <p>Basically, I'd like it so that if the scrollbar is at the bottom of the window (i.e. the end of the incoming data), adding more data should scroll the view onwards. If, however the view has been scrolled up a little (i.e. the user is looking at something interesting like an error message), the app should just add the text on the end without scrolling any more.</p>
  
  <p>I've got two problems at the moment:</p>
  
  <ol>
  <li>I can't work out how to retrieve the current scroll position (calls to GetScrollPos() don't seem to work - they just return 0).</li>
  <li>I can't work out how to retrieve the current range of the scroll bar (calls to GetScrollRange() just return 1).</li>
  </ol>
  
  <p>I've googled a bit and there seem to be a few hints that suggest GetScrollPos and GetScrollRange won't work for a wx.TextCtrl? Has anyone else had any experience in this area? Is there a nice easy way to solve the problem or am I going to have to roll my own wx.TextCtrl?</p>