开发者

How can we position the auto scroll of a winform at the top?

开发者 https://www.devze.com 2023-02-15 10:41 出处:网络
How can we position the auto scroll of a winform at the top? Currently it is 开发者_StackOverflow社区automatically scrolling to bottom of the form.this.AutoScrollPosition = new Point(0,0);

How can we position the auto scroll of a winform at the top? Currently it is 开发者_StackOverflow社区automatically scrolling to bottom of the form.


this.AutoScrollPosition = new Point(0,0);

Where 'this' is the form.


Set Focus to a control at the top. Winforms scrolls to the control that has focus


In my case I wanted to scroll to a certain control and in the Form that contains mycontrol I did:

mycontrol.Focus();

wich scrolls to the Control


If your form has a panel controls click "View" -> "Tab Order" and click the panel first. The tab's Tab Order will change to 0. This will automatically focus the first panel in the form.

0

精彩评论

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