选择文本框时如何停止面板滚动条的滚动

发布于 2024-10-04 23:37:45 字数 127 浏览 6 评论 0原文

我有一个名为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

若言繁花未落 2024-10-11 23:37:45

我没有明白你的确切问题。我尝试做与你相同的事情,但将焦点集中在我单击鼠标的同一个文本框中。

设置面板的一些属性
喜欢:
自动滚动=假;
自动调整大小=真;

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;

简单爱 2024-10-11 23:37:45

我有同样的问题。

您可以使用“TableLayoutPanel”而不是“Panel”来避免滚动条改变其位置。

I had same problem .

You can use TableLayoutPanel" instead of "Panel" to avoid scrollbar change its position.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文