Quantcast
Channel: HTML Renderer
Viewing all articles
Browse latest Browse all 693

New Post: ScrollToEnd() / ScrollToBegin()?

$
0
0
Nevermind, I found this:

https://htmlrenderer.codeplex.com/discussions/442448

At first it didn't work the way I expected, but the problem was a redundant Invalidate().

So I added the following to my SimpleHtmlPanel wrapper:
    public void GoToStart()
    {
        AutoScrollPosition = new Point(HorizontalScroll.Minimum, VerticalScroll.Minimum); 
    }

    public void GoToEnd()
    {
        AutoScrollPosition = new Point(HorizontalScroll.Maximum - HorizontalScroll.LargeChange, VerticalScroll.Maximum - VerticalScroll.LargeChange);        
    }
Works like a charm!

Viewing all articles
Browse latest Browse all 693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>