如何创建 FlatScrollBar
Microsoft VB6 (Visual Basic 6) 有一个 FlatScrollBar控制。我非常沮丧地发现在 C# 中没有找到任何这样的实现。
我谦虚地向我的 C# 开发人员同事和 Windows 窗体专家询问这一壮举是否可以在 C# 中实现?我感谢提前对此事的任何答复或见解。
Microsoft VB6 (Visual Basic 6) had a FlatScrollBar Control. I was terribly devastated not to find any such implementation in C#.
I humbly ask to my fellow C# developers and Windows Forms gurus if this feat is achievable in C# or not ? I thank any reply or insight into this matter in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Windows 通用控件版本 6 中已删除对平面滚动条的支持。它仅在旧版本中可用。这意味着您不能同时拥有视觉样式和平面滚动条。 Google InitializeFlatSB,您可能会发现有人认为扁钢更重要。我比较怀疑。
Support for flat scrollbars has been removed from the Windows common controls version 6. It is only available in the legacy version. Which means you cannot have visual styles at the same time as flat scrollbars. Google InitializeFlatSB, you might find somebody that thought the flat bars were more important. I rather doubt it.
好吧,我几乎不称自己为大师(远非如此;-)),但工具箱中有一个 HScrollBar(水平)和一个 VScrollBar(垂直),这可能适合您的需求。
还可以在控件(或窗体)上使用 AutoScroll 属性。据我正确理解(尚未使用它),它会为您决定是否需要滚动条,具体取决于视觉之外是否有控件。
但是,如果这不是您想要的,则可以使用定制的滚动条。 CodeProject 上有很多关于它的文章。
希望这能让您朝着正确的方向前进。
Well, I hardly call myself a guru (far from it ;-) ) but in the Toolbox there's a HScrollBar (horizontal) and a VScrollBar (vertical), which might suit your needs.
There's also the possibility to use the AutoScroll property on a control (or form). As I understand that correctly (haven't used it yet) it decides for you if the scrollbars are needed or not, depending whether there are controls outside the visual.
However, if this is not what you're looking for, there's a possibility to use custom-made scrollbars. There are a lot of articles about it on CodeProject.
Hope this puts you in the right direction.