5,696,576 members and growing! (16,922 online)
Email Password   helpLost your password?
Desktop Development » Selection Controls » General     Intermediate

C# RangeBar control

By Detlef Neunherz

A control that combines two scrollbars for choosing two related values
C#, Windows, .NET 1.0, .NET 1.1, .NETVisual Studio, VS.NET2002, VS.NET2003, Dev

Posted: 15 May 2002
Updated: 8 Jul 2003
Views: 73,326
Bookmarked: 36 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
20 votes for this Article.
Popularity: 5.16 Rating: 3.96 out of 5
0 votes, 0.0%
1
1 vote, 7.7%
2
0 votes, 0.0%
3
4 votes, 30.8%
4
8 votes, 61.5%
5

Introduction

If you want to give the user the possibility to define a number interval to set a two side threshold in an image processing program, then you can use two scrollbars, first for lower and second for upper limit. Further you have to catch changing events to prevent that lower limit is higher than the upper.

Wouldn't it be easier to have a control that combines two scrollbars?

The ZzzzRangeBar is a two button slide control for setting an integer number interval. If you push with a left click on a slide button it will marked and while mouse button is pressed you can move the slider left and right. Otherwise you can use the keys + and - to manipulate the slider position.

The control will throw two events. While left mouse button is pressed and the position of one slider has changed the event OnRangeChanging will generate and if you release mouse button, the event OnRangeChanged signals program that a new range was selected.

History

16 May 2002 first version of rangebar control

7 June 2003  enhancing control with vertical orientation and different scaling ticks options

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Detlef Neunherz



Occupation: Web Developer
Location: Germany Germany

Other popular Selection Controls articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 13 of 13 (Total in Forum: 13) (Refresh)FirstPrevNext
GeneralnicememberBassam Alugili9:47 27 Nov '08  
QuestionUsage of this control.membervijaysubramaniam2:58 21 Jul '08  
GeneralThank you, question.memberkalin84:56 11 Jan '06  
GeneralThnxmemberngna5:30 12 Mar '04  
Generalplz help me with running ur codememberrachel20307:01 2 Mar '04  
GeneralAdded ability to move entire range (both marks simultaneously)memberMtnBiknGuy15:44 23 Oct '03  
GeneralRe: Added ability to move entire range (both marks simultaneously)sussDetlef Neunherz22:04 23 Oct '03  
GeneralRe: Added ability to move entire range (both marks simultaneously)memberMtnBiknGuy5:06 26 Oct '03  
GeneralVS 2002memberMtnBiknGuy10:18 23 Oct '03  
GeneralVery good, butmemberGary Sui13:59 28 Jun '03  
GeneralRe: Very good, butsussAnonymous1:49 3 Jul '03  
GeneralMinor improvmentsmemberrbarb1:14 20 May '02  
GeneralThank you...!!!memberAnonymous15:23 17 May '02  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 8 Jul 2003
Editor: Nick Parker
Copyright 2002 by Detlef Neunherz
Everything else Copyright © CodeProject, 1999-2008
Web17 | Advertise on the Code Project