|
Windows Control: |
|
|
Introduction to the Time Picker Control |
|
As described already, the date time picker is two controls in one object. To transform a date time picker into a time picker control, change its Format property to a Time value:
|
|
Although optional, you should (with emphasis) also set the ShowUpDown Boolean property to True. This makes it a true time picker control: ![]() If you do not set the ShowUpDown property to true, the control would display as a combo box and when the user clicks the arrow button, a calendar would come, which does not make sense since the purpose of the control is to deal with time values. |
The time picker is meant either to only display a time to the user or to both display time and allow the user to specify a time. The control follows the format of the time values set in the regional settings of Control Panel. By default, in US English, the time is divided in four sections that include the hour value, the minute value, the second value, and the AM/PM side. These sections are separated by standard characters that also are specified in the regional settings of Control Panel. To change the time, the user can click a section, such as the hour, the minute, the second, or the AP/PM side, then click one of the arrows of the spin button. The up button increases (only) the value of the selected section while the down button decreases (only) the value of the selected section. The user can also use the arrow keys to change the value of a section. After changing the of the time, even the change occurs for only one section, the control fires a ValueChanged event, which is the default event of the control. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||
| Home | Copyright © 2008-2009 C# Key | Next |
|
|
||