.NET 选项卡控件。当Child Control具有最小尺寸且锚定在右侧时不滚动
我有一个带有选项卡控件的简单对话框,其中属性 Dock = Fill。在选项卡页上,我添加另一个控件并将其属性 Anchor 设置为“左、上、右”,最小尺寸设置为“600,300”。我将选项卡页 AutoScrolling 的属性设置为 true。 但是,当我调整对话框大小时,当对话框宽度小于子控件的最小宽度时,选项卡页的水平滚动不起作用。 为什么水平滚动在这种情况下不起作用?这是错误还是功能?
多谢!
I have a simple dialog with tab control whit property Dock = Fill. On the tab page I add another control and set its properties Anchor as 'Left, Top, Right' and min size as '600,300' for example. I set the property of tab page AutoScrolling to true.
But when I resize the dialog the horizontal scrolling of the tab page doesn't work when the dialog width is smaller than min width of the chield control.
Why horizontal scrolling doesn't work in this case? Is it bug or maybe feature?
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我什至无法显示滚动条。自动调整布局大小时,右侧/底部锚点效果不佳。将 AutoScrollMinSize 属性设置为适当的值,这还可以确保按钮右侧有足够的边距。
I can't even get the scrollbar to show up. Right/bottom anchors don't work well when auto-sizing layout. Set the AutoScrollMinSize property to an appropriate value, that also ensures you've got enough margin to the right of the button.
这是因为锚。您将其锚定在左侧和右侧,这意味着它将没有最小宽度,其宽度由其容器的大小决定。
您想要达到什么效果?
It's because of the Anchor. You anchored it on the left and right which means that it will have no minimum width, its width is determined by its container's size.
What is the effect you're trying to achive?