Set AutoScrollPosition of horizontal scrollbar on tabpage

2013-05-10 vb.net autoscroll tabpage

I have a tabcontrol that has a tabpage that I've added autoscroll to via the properties window. When the scrollbars appear, the horizontal scrollbar is automatically scrolled all the way to the right. This is the exact opposite of what I need, when the horizontal scrollbar appears, I need it to be automically scrolled all the way to the left. How do I do this? I've been tinkering with AutoScrollPosition, but it doesn't seem to do anything...most likely user error on my part. Any advice? I haven't been able to find anything on the net that's been helpful.

I'm using vb.net

Thanks!

Answers

Autoscroll position is relative to its current position you'll need to find the current position and then take that away.

tabpage1.AutoScrollPosition = New Point(-tabpage1.AutoScrollPosition.X, 0)

Related