Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scrolling through dates

Status
Not open for further replies.

funkyyuzzam

Programmer
Aug 12, 2002
10
GB
Help

Is it possible to scroll through dates using the scroll bar control. if so, how?

Funky
 
Sure, you could use a scrollbar in combination with some other control(s). But a ListBox would be so much easier for this purpose, why not use that?

ed
 
funkyyuzzam -

You really want to use the date-time picker control, and not a scrollbar because:

1) What's the minimum date to be represented by your scroll bar? (0/0/0000 would be a lot of dates to scroll through!)

2) What's the maximum date to be represented by your scroll bar? (too soon, and you've re-created the Y2K bug)

3) Scrollbars are typically limited to 32767 values, or 89 years worth (not a lot of days, in other words)

4) With 32k worth of dates in there, it becomes physically hard to select one, as your mouse usually doesn't have the resolution needed. Even using the keyboard accelerators makes it tough.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top