Keep htmlPanel scrolled to bottom?

Feb 3, 2013 at 8:20 AM
Is there any way to keep the htmlPanel scrolled to the bottom of the page?
I'm attempting to use this as a continuous logging window and as a chat window and would like this to keep the bottom row of the HTML in view.

With a normal textbox or rtb you would set your selection as the last char and scrollToCaret, but that doesn't appear to be a method for that on htmlPanel.

Thanks.
Feb 3, 2013 at 9:23 AM
Ok, I'll go ahead and answer my own question. ;)

I can use the AutoScrollPosition to get me started.

htmlPanel1.AutoScrollPosition = new Point(0, 10000); // keeps my bottom row in view

This does create an annoying "feature" which drives me insane in other apps, is that when you scroll back (or up), any new data added to the panel forcibly scrolls you to the bottom. Very annoying when there's is constant data coming in. I'll have to write something up that will only do the autoscroll if the scroll bar is at it's bottom most position.