如何将滚动条从工具箱附加到面板,以便它相对于表单/面板展开?
我在表单的面板上拖动了滚动条。现在我想将该滚动条与表单绑定。这样,每当我展开表单时,滚动条就会展开并保持在右侧(如果是垂直滚动条)和底部(如果是水平滚动条)。 现在发生的情况是,即使我调整大小或最大化表单,滚动条仍保留在我放置它的位置。帮助!
I have dragged a scroll bar on a panel on my form. Now i want to bind that scroll bar with the form. such that whenever i expand my form the scorll bar expands and remains at the right (incase of vertical scroll bar) and at bottom(in case of horizontal scroll bar).
What is happening right now is that the scroll bar remains at the place where i had positioned it even if i resize or maximize the form. Help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须处理表单的 Size 事件。
当表单大小发生变化时,您可以移动滚动条,使其保持右侧齐平,并更改滚动条的长度,使其始终正确。
You have to handle the Size events of the form.
When the form size changes, you move your scrollbar so it stays flush right, and change the length of the scrollbar so it's always correct.