选择文本框时如何停止面板滚动条的滚动
我有一个名为 Panel1 的面板,其中包含许多文本框。(大约 12 个文本框)
当我单击文本框(最后一个文本框之一)时,面板的滚动条位置更改为另一个位置。(它自动滚动并焦点更改)。
我怎样才能防止这种情况?
I have a panel called Panel1 that contains many textBoxes .(around 12 textBoxes)
When I click on a textBox (one of the last textBoxes) the Panel's scrollbar position change to another position.(It scrolls automatically and focus changes).
how can i prevent this ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我没有明白你的确切问题。我尝试做与你相同的事情,但将焦点集中在我单击鼠标的同一个文本框中。
设置面板的一些属性
喜欢:
自动滚动=假;
自动调整大小=真;
I am not getting your exact problem. I tried to do same as you did, but getting focus on same textBox where i clicked my mouse.
Set some properties of panel
Like:
autoscroll=false;
autoResize=true;
我有同样的问题。
您可以使用“TableLayoutPanel”而不是“Panel”来避免滚动条改变其位置。
I had same problem .
You can use TableLayoutPanel" instead of "Panel" to avoid scrollbar change its position.