Form1 自动滚动 = 垂直滚动
我启用了自动滚动,但无法出现水平滚动条。谁能帮我通过自动滚动仅激活表单上的垂直滚动条?
I have autoscroll enabled BUT I can't have horizontal scrollbars appear. Can anyone please help me to only activate vertical scrollbars on the form with Autoscroll?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
应该摆脱它。
有趣的是,看起来我说应该摆脱它是对的。搜索了一下,这似乎是 Winforms 中一个已知且未修复的错误。 此页面意味着如果您不介意在 user32 中调用一些非托管代码,则可能有某种方法可以做到这一点,但看起来最好的选择就是确保所有控件都适合表单宽度(通过对接或锚定它们)因为滚动条是根据需要添加的。
抱歉误导您了。
Should get rid of it.
Interesting, looks like I was right when I said should get rid of it. Searching around it looks like this is a known and unfixed bug in Winforms. This page implies that there may be some way to do it if you don't mind pinvoking some unmanaged code in user32, but it looks like the best bet is simply to ensure that all your controls fit inside the form width (by docking or anchoring them) since the scrollbars are added as required.
Sorry for misleading you.