Click here to Skip to main content
14,661,507 members
Articles » Desktop Development » Miscellaneous » Range Selectors
Article
Posted 25 Jun 2002

Stats

87.5K views
4.5K downloads
41 bookmarked

Skin based slider control Mark 2

Rate this:
4.36 (7 votes)
Please Sign up or sign in to vote.
4.36 (7 votes)
12 Sep 2002CPOL
Here's a recoding of aeropriest's skinned slide control.

Sample Image - Demo.jpg

Introduction

Needing a flexible slider control, I looked on CodeProject and found aeropriest Skin based slider control ( aeropriest's Article). As is often the case, the ideas where very good but the code contained a few bugs. I downloaded the code, fixed a few problems and here is the result.

The main changes are:-

  • Slider follows mouse when dragged correctly.
  • Slider is redrawn correctly.
  • Slider changes bitmap when dragged.
  • Back ground can be drawn dynamically.
  • Back ground can be centered/stretched to correct size.
  • Code tidied up.

For usage and other information see the original article. (aeropriest's article)

Change history

  • 27/6/02
    • Fixed a small bug with the bitmap's color depth
    • Changed the second sliders color to make it more obvious what is going on
    • Tidied zip file
  • 29/6/02
    • Added tooltips when dragging slider
    • Rewrote drawing code
  • 2/9/02
    • Added vertical sliders
    • Added SetPos()
    • Reduced flickering

I don't plan any more changes to this article.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Jon
Software Developer
United Kingdom United Kingdom
No Biography provided

Comments and Discussions

 
QuestionHow for a triangular thumb image?? Pin
Member 3451566-Oct-08 0:06
MemberMember 3451566-Oct-08 0:06 
GeneralMoveWindow Problem Pin
iron5921-Sep-08 23:38
Memberiron5921-Sep-08 23:38 
GeneralWant to Load Bitmaps from Outside Pin
MacGadger19-Apr-06 8:50
MemberMacGadger19-Apr-06 8:50 
GeneralCan't build Pin
pahluwalia16-Jan-04 8:40
Memberpahluwalia16-Jan-04 8:40 
GeneralRe: Can't build Pin
Jon19-Jan-04 2:47
MemberJon19-Jan-04 2:47 
GeneralMuch better Pin
leonbourassa19-Aug-03 1:07
Memberleonbourassa19-Aug-03 1:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.