Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Love programming

Sign in to follow this  


The last two days have been good to me programming wise. A few bits of my GUI framework have come together very nicely.

And a hint for anyone trying to program a scrollbar: It's actually built up of five buttons:
|1|             2             | 3 |    4     |5|

1,5: the end buttons, scroll by small amount
2,4: the gutter, scroll by large amount
3: scoller, this buttons needs to be draggable
Sign in to follow this  


Recommended Comments

Actually, you can get away with only four by making the gutter/track a single "button", but the position in which it is clicked as related to the thumb/scroller becomes important.

But in any case, no, a scrollbar(especially a draggable scrollbar) is not an easy control to implement, especially if you are trying to get the same sort of behavior that a standard windows scrollbar will give you. And also a confusing control to use, as a scrollbar positioned at the bottom is best represented by a negative value, which is the number of pixels to scroll the top of the view by.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!