title: How to preserve page position in the wx.html.HtmlWindow after link clicked?
body: <p>I have a wx python application with wx.html.HtmlWindow window:</p>
  
  <pre><code>class MyHtmlWindow(wx.html.HtmlWindow):
  </code></pre>
  
  <p>Method SetPage is used to update html content on the window:</p>
  
  <pre><code>def OpenURL(self, url, save_scroll_pos=True):
      def callback(src, url, save_scroll_pos):
          pos = self.GetViewStart()[1]
          self.SetPage(src)
          if save_scroll_pos:
              self.Scroll(0, pos)
      def errback(err): 
          self.SetPage('&lt;html&gt;Failed:&lt;br&gt;%s&lt;/html&gt;' % err.getErrorMessage())
  
      d = self.DownloadURL(url)
      d.addCallback(callback, url, save_scroll_pos)
      d.addErrback(errback)
  </code></pre>
  
  <p>I want to save the current scroll position of the page after opening and this code is working. Only one problem, and this is big problem for me: it is rendering html page twice.
  First after self.SetPage and second after self.Scroll.</p>
  
  <p>So each time I call self.OpenURL I see the page is blinking. It scrolls to the top and right after to the needed position.</p>
  
  <p>I was trying to fix it by handling EVT_PAINT:</p>
  
  <pre><code>    self.Bind(wx.EVT_PAINT, self.OnPaintEvt)        
  </code></pre>
  
  <p>But self.OnPaintEvt is calling <strong>after</strong> self.Scroll - so this way not for me.</p>
  
  <p>Any Ideas?</p>