The SRP DatePicker Control provides an easy and intuitive interface for selecting dates. The DatePicker displays any number of months simultaneously for quick access, and users can scroll to other months using scroll buttons or by clicking on any month header. Any number of dates can be selected continiously or non-continuously. Developers can give visual cues to their users by setting the font and colors of individual dates. The SRP DatePicker Control makes a great popup or date-by-date navigation tool.
Using SRP DatePicker Control
The following tutorials will familiarize you with the SRP DatePicker Control. These white papers take a topical approach to explaining how to use the control. New users should start here, since many of these topics will give a deeper understanding of the control and the philosophies behind its design. Once you've grasped these concepts, use the reference guides for details on particular properties, methods, and events.
Topic | Description |
---|---|
Date Selection | Selecting one or more dates in the date picker. |
Layout | Setting the date picker presentation. |
Navigation | Navigating the date picker. |
Properties
OLE control properties are the primary means of interacting with OLE controls. Properties, much like OI control properties, describe the persistent attributes of the control, that is, attributes having some meaningful value for the entire life of the control. Like OI control properties, OLE control properties are manipulated using the Get_Property and Set_Property routines. The following properties apply to the SRP DatePicker Control:
Property | Description | Version Introduced | Pro Version Introduced |
---|---|---|---|
Autosize | Determines if the control should decide the number of visible months based on its size. | ||
Border | The control's border style. | ||
BorderColors | Customizes the colors of an SRP ActiveX Control's border. | 3.0.3 | 3.1.0 |
DayOfWeekNames | The displayed day of week names. | ||
DayStyle | A day's font and color scheme. | ||
FirstDayOfWeek | The day of the week to appear on the left most column. | ||
FirstMonth | The first visible month. | ||
FirstWeekOfYear | The month and day that starts the first week of the year. | ||
Font | The font used to render the control. | ||
GridSize | The number of visible months. | ||
HighlightToday | Determines if today's date is identified by a colored border. | ||
MaxSelCount | The maximum number of selectable days. | ||
MonthDelta | The number of months to scroll at a time. | ||
MonthNames | The displayed month names. | ||
NoncontinuousSelection | Determines if users can select non-continuous dates. | ||
NoneButtonVisible | Shows or hides the None button. | ||
ProgID | The control's ProgId/Class Name. | ||
Range | The minimum and maximum allowable dates. | ||
RightToLeft | Determines if reading order is right-to-left. | ||
Selection | The current selection. | ||
SelPos | The currently selected cell. | ||
ShowNonMonthDays | Determines if the non month days appear in the first and last months. | ||
ShowWeekNumbers | Determines if week numbers appear to left of each month. | ||
Theme | The visual theme. | ||
TodayButtonVisible | Shows or hides the Today button. | ||
Version | The control's version info. |
Methods
OLE control methods provide convenient one-time operations to developers. Unlike properties, whose values are persistant over the life of a control, methods represent actions that a control can perform. Often, methods will change the values of other control properties, so be sure to read the Remarks section of each method carefully. The following methods apply to the SRP DatePicker Control:
Method | Description | Version Introduced | Pro Version Introduced |
---|---|---|---|
EnsureVisible | Brings a date into view. | ||
EnsureVisibleSelection | Brings the selected date into view. | ||
ScrollLeft | Scroll's to previous months. | ||
ScrollRight | Scroll's to subsequent months. | ||
SetDayStyles | Sets any number of dates and date ranges to the same visual style. | ||
ShowContextMenu | Displays a context menu at the given mouse point. | 3.0.1 |
Events
OLE control events provide a way for the OLE control to communicate back to OpenInsight. Once an event has been qualified using OI's QUALIFY_EVENT message, then the OLE control will fire the event to OpenInsight allowing you to respond to any one of the control's predefined actions. Some events allow you to stop certain actions before they occur, so be sure to read the Remarks section of each event carefully. The following events apply to the SRP DatePicker Control:
Event | Description | Version Introduced | Pro Version Introduced |
---|---|---|---|
OnClick | Fires when the user clicks on the control. | ||
OnContextMenuClick | Fired when a menu item on the custom context menu is clicked | 3.0.1 | |
OnDblClick | Fires when the user double clicks on the control. | ||
OnGotFocus | Fired when the control receives input focus. | 3.0.3 | 3.1.0 |
OnLostFocus | Fired when the control loses input focus. | 3.0.3 | 3.1.0 |
OnMonthChange | Fired when the months are scrolled. | ||
OnSelChange | Fires when the user changes the selection. | ||
OnMouseEnter | Fired when mouse enters the control. | 3.0.3 | 3.1.0 |
OnMouseExit | Fired when the mouse leaves the control. | 3.0.3 | 3.1.0 |