积极答复者
请教关于滚动条的问题

问题
答案
-
Hi DYLIKE,
很抱歉重写Panel似乎也没法重画它的ScrollBar。因为那个PaintEventArgs没有提供足够可以让你重绘的参数和控件的Handle。另外有个帖子也提到这个问题。
原文如下:
The scrollbars you see most often, including those built into most winforms controls, are rendered by Windows and there is no way to override their appearance in WinForms short of implementing an entirely custom solution which completely takes over the rendering and behavior of the common scrollbar control. There are some commercial packagages which claim to do this (google winforms skinning).
http://stackoverflow.com/questions/126555/custom-painting-windows-forms-scrollbar
大概意思就是控件里内置的那个ScrollBar是由Windows系统绘制的,通过重写控件不能重绘ScrollBar。然后他推荐使用第三方的皮肤控件来达到整体的美化效果。
Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.- 已标记为答案 feiyun0112Moderator 2009年8月28日 0:46
2009年8月25日 7:40
全部回复
-
可能只有重载panel,在Paint事件中绘制
http://feiyun0112.cnblogs.com/2009年8月25日 1:23版主 -
Hi DYLIKE,
很抱歉重写Panel似乎也没法重画它的ScrollBar。因为那个PaintEventArgs没有提供足够可以让你重绘的参数和控件的Handle。另外有个帖子也提到这个问题。
原文如下:
The scrollbars you see most often, including those built into most winforms controls, are rendered by Windows and there is no way to override their appearance in WinForms short of implementing an entirely custom solution which completely takes over the rendering and behavior of the common scrollbar control. There are some commercial packagages which claim to do this (google winforms skinning).
http://stackoverflow.com/questions/126555/custom-painting-windows-forms-scrollbar
大概意思就是控件里内置的那个ScrollBar是由Windows系统绘制的,通过重写控件不能重绘ScrollBar。然后他推荐使用第三方的皮肤控件来达到整体的美化效果。
Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.- 已标记为答案 feiyun0112Moderator 2009年8月28日 0:46
2009年8月25日 7:40