本文介绍了为什么单击文本框会导致 AutoScroll 面板滚动回顶部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!
问题描述
在 C# 应用程序中完成注册表单,我注意到如果我启用 AutoScroll 然后在滚动下方有一个文本框并单击它,它会一直跳回顶部.有没有办法用一些代码来解决这个问题,或者它是一种礼仪?
Finishing up a register form in a C# application and I noticed with the panel if I enable AutoScroll and then have a textbox that is below the scroll and click on it it jumps all the way back up to the top. Is there a way to fix this with some code or is it a propriety?
我很难用语言来解释它,所以这里有一个简短的视频来展示这种行为.
It's a little difficult for me to explain it in words, so here's a short video that shows the behavior.
推荐答案
我也遇到了同样的问题.我在面板中使用以下代码修复了它:
I have had the same problem. I fixed it with this code in my panel:
protected override Point ScrollToControl(Control activeControl)
{
return this.AutoScrollPosition;
}
这篇关于为什么单击文本框会导致 AutoScroll 面板滚动回顶部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
The End


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)