我想知道如何向下滚动包含TabControl
的Panel
VB.NET 使用按钮而不显示滚动条。我尝试了以下方法
Dim Location As Integer = Panel_Images.Location.Y
If Location + 20 < Panel_Images.VerticalScroll.Maximum Then
Location += 20
Panel_Images.VerticalScroll.Value = Location
Else
'If scroll position is above 280 set the position to 280 (MAX)
Location = Panel_Images.VerticalScroll.Maximum
Panel_Images.AutoScrollPosition = New Point(0, Location)
End If
它只滚动一次,不再工作。
所以你想在另一个控件中设置面板的位置吗?如果要向上滚动控件,请设置它的位置。Y(或其"Top"(属性减去您想要的任何值,它将被其父级剪裁。
若要向下滚动,请将属性设置为正数。