Scrolling a tabpage using a button instead of the autoscroll bar
Scrolling a tabpage using a button instead of the autoscroll bar
|
I want my tabpage to be scrolled by using my own button, so I have the following:
if (tabControl1.SelectedTab.VerticalScroll.Value - 200 > tabControl1.SelectedTab.VerticalScroll.Minimum) { tabControl1.SelectedTab.AutoScrollPosition = new System.Drawing.Point(0, tabControl1.SelectedTab.VerticalScroll.Value - 200); }else { tabControl1.SelectedTab.AutoScrollPosition = new System.Drawing.Point(0, tabControl1.SelectedTab.VerticalScroll.Minimum); }
this is the event handler method to clicking the button for scrolling down When i click the down button, it only moves down once, the second time i click it it doesnt work any more...
this happens when i have the AutoScroll disabled, but when i have autoscroll enabled, its fine
why!
Can someone help me is there anyway to enable the autoscoll, but hide the scroll bar ! maybe override the onPaint method for tabControl
| | |
Scrolling a tabpage using a button instead of the autoscroll bar