开发者

Panel AutoScroll position setting

开发者 https://www.devze.com 2023-01-09 08:52 出处:网络
How to set the AutoScrollPosition to the bottom most position? I tried panel.AutoScrollPosition = new Point(0, panel.Height);

How to set the AutoScrollPosition to the bottom most position?

I tried

panel.AutoScrollPosition = new Point(0, panel.Height);
开发者_如何学运维

but it didn't work.


You can use the panel's VerticalScroll.Maximum-property:

panel.AutoScrollPosition = new Point(
    Math.Abs(panel.AutoScrollPosition.X), 
    panel.VerticalScroll.Maximum);
0

精彩评论

暂无评论...
验证码 换一张
取 消