Wednesday, September 30, 2009

Time, the WinForm way - gTimePicker

CodeProject - gTimePicker- Control to Pick a Time Value (VB.NET)

“Stop using the DateTimePicker for time values, this control makes it easy to pick a time, and if you act now, get the matching Nullable gDateTimePicker at no extra cost.

image

I couldn't put up with the standard time part of the DateTimePicker any longer. I wanted an easy to use date dropdown and a non-existent time dropdown. First, I made the gTimePickerCntrl to pick the time in a couple of clicks using a clock-like interface. Second, I needed a dropdown control to contain it. Third, the developer in me needed the extra design-time support.

After making the gTimePicker, I realized I needed a nullable DateTimePicker to go with it. Now, I have added the gDateTimePicker and added a nullable feature to the gTimePicker.

How to Use the gTimePickerCtrl

Very simple - click a number in the inner ring for the hour. Click a number from the outer ring for minutes in five minute increments. Click the bottom row for minutes in between the five minute increments.

…”

I like that. I’ve also fought the DateTimePicker Time entry battle and like this approach. An analog look is a logical metaphor to use when picking a time. That and I like supporting VB.Net projects… ;)

As you can see from the zip, it’s not a simple or minor project…

image

No comments: