更改滚动条的宽度

发布于 2024-10-10 03:36:58 字数 118 浏览 9 评论 0原文

我正在开发一个触摸屏程序。我正在使用 c# 和 Visual studio 2008。有什么方法可以更改滚动条的宽度吗?我知道我可以更改 Windows 的显示属性。但我只想在我的程序中而不是在完整的系统中。谢谢你的帮助!

I am working on a program for touchscreens. I am using c# and Visual studio 2008. Is there any way to change the width of the scrollbars? I know that i can change in Display Properties of Windows. But i only want in my programm not in the complete system. Thanks for ya help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

§对你不离不弃 2024-10-17 03:36:58

看看这个:

Winforms - 调整 CheckedListBox 上垂直滚动条的宽度

也值得一提:

.NET Compact Framework - 让滚动条更宽

相同,但这次通过使用滚动条控件提供了更好的解决方案:

更改滚动条的宽度

中的另一个那家伙教如何创建自己的滚动条控件(有趣):

设置 DataGridView 的滚动条宽度

最后一个(值得尝试):

有没有办法获取 ListView 控件的滚动条高度和宽度

Check this out:

Winforms - Adjust width of vertical scrollbar on CheckedListBox

Worth mentioning too:

.NET Compact framework - make scrollbars wider

More of the same, but this time with a better solution through the use of the scrollbar control:

Change the width of a scrollbar

Another one in which the guy teaches how to create your own scrollbar control (interesting):

Set the Scrollbar width of a DataGridView

The last one (worth trying):

Is there a way to get the scrollbar height and width for a ListView control

゛清羽墨安 2024-10-17 03:36:58

最简单的方法是在表单/控件的控件集合中搜索滚动条实例,然后简单地更新宽度值。

foreach(Control ctrl in dataGridProducts.Controls)
    if (ctrl.GetType() == typeof(VScrollBar))
        ctrl.Width = 100;

这适用于带有 dot net 紧凑框架的 Windows CE

The easiest way would be to search for scrollbar instances in the form/control's controlcollection and then simply update the width value.

foreach(Control ctrl in dataGridProducts.Controls)
    if (ctrl.GetType() == typeof(VScrollBar))
        ctrl.Width = 100;

This works on Windows CE with dot net compact framework

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