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!

有帮助吗?

解决方案

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)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top