Results 1 to 1 of 1

Thread: Scrollbars unlocked

  1. #1

    Thread Starter
    Addicted Member cheesebrother's Avatar
    Join Date
    Jul 2011

    Scrollbars unlocked

    Perhaps some of you saw my question on the forum a little while ago. I was asking how to make a custom scrollbar. The problems were these, how to get the height of the bar and how to get the top of the bar off of a value. Now, after thinking a lot more about it, I've finally managed to figure it out and make my own. I've made it to be the same as vb's hscrollbar and vscrollbar. The bar will always be the same height as vb's and all in all it's the same. This isn't really special how it is right now(as it only does what vb's does) but it doesn't stop here. This scrollbar's purpose is to be made into something special by you. There a two reasons that I can think of why you might want a custom scrollbar.

    1. Like me, you might want to draw the scrollbar yourself. After all when everything is in your hands there's no reason why not to make a scrollbar that looks much nicer than vb's. A cool thing which i see people do is they change the color between the bar and the top/bottom buttons based on value. I have provided this usercontrol with no custom graphics. Right now it pretty much looks the same as vb's. There is a place for you to make your own graphics which is marked in the code (there's a property to switch between vb and custom graphics). I decided to leave out my custom look as everybody has their own taste/theme for how they want things to look.

    2. Vb's scrollbars work on integers so the max is 32000 and the min is -32000. If for some reason these numbers aren't big enough for you this scrollbar will be. It works with double values (as integers of course) so if the limits of the max and the min isn't enough for you you've got a BIG problem .

    This control has an orientation property like the flatscrollbar. This makes the whole thing simple. I hope you will like it.
    Attached Files Attached Files
    Hooked for good.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width