简体   繁体   中英

Draw a line on horizontal scrollbar - C#

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,

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM