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

Love programming

Sign in to follow this  
rick_appleton

161 views

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  


2 Comments


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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!