Draw a line on horizontal scrollbar - C#

[亡魂溺海] 提交于 2019-12-25 04:17:27

问题


Is there any way to draw a line (about 5 pixels width) on hScrollBar ? The line will move from one end to another. It will represent the movement.

Thank you,


回答1:


I think its possible. You have two options - an owner drawn scrollbar (an example in C++/MFC to get a hang - http://www.codeproject.com/Articles/14724/Replace-a-Window-s-Internal-Scrollbar-with-a-custo ), the second option is to track the scrollbar movements, draw the line and repaint it.

EDIT

This might be of help too - http://msdn.microsoft.com/en-us/library/system.windows.forms.visualstyles.visualstyleelement.scrollbar.lefttrackhorizontal.aspx



来源:https://stackoverflow.com/questions/10553782/draw-a-line-on-horizontal-scrollbar-c-sharp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!