[Overview][Classes][Procedures and functions][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
TCalendarDialog - a popup calendar dialog that allows a date to be selected and returned to the main program.
Source position: extdlgs.pas line 190
type TCalendarDialog = class(TExtCommonDialog) |
||
protected |
||
class procedure WSRegisterClass; override; |
|
Registers this component class with the current WidgetSet. |
procedure GetNewDate(); |
|
GetNewDate - programmatic simulation of OnClick event, which transfers the selected date to the calling program. |
procedure CalendarDblClick(); |
|
CalendarDblClick - method for handling doubleclick on the calendar. |
function DefaultTitle; override; |
|
Contains the default value for the Title displayed on the calendar dialog form. |
public |
||
constructor Create(); override; |
|
Constructor for the class instance. |
function Execute; override; |
|
Configures and displays the form for the calendar dialog, and captures the results. |
property Left: Integer; [rw] |
|
Contains the left coordinate for the dialog. |
property Top: Integer; [rw] |
|
Contains the top coordinate for the dialog. |
published |
||
property Date: TDateTime; [rw] |
|
The selected Date, for return to the main program. |
property DisplaySettings: TDisplaySettings; [rw] |
|
DisplaySettings - the user-selected settings determining the appearance of the display. |
property OnDayChanged: TNotifyEvent; [rw] |
|
OnDayChanged - event handler when a different day is selected. |
property OnMonthChanged: TNotifyEvent; [rw] |
|
Event handler signalled when a different month is selected. |
property OnYearChanged: TNotifyEvent; [rw] |
|
OnYearChanged - event handler when a different year is selected. |
property OnChange: TNotifyEvent; [rw] |
|
Event handler signalled when the value in Date has been changed. |
|
Caption displayed on the OK button. |
|
property CancelCaption: TCaption; [rw] |
|
Caption displayed on the Cancel button for the calendar dialog form. |
end; |
|
TCalendarDialog - a popup calendar dialog that allows a date to be selected and returned to the main program. |
|
| | ||
|
The common base class for custom drawn dialogs (Calculator and Calendar). |
|
| | ||
|
The base type from which other dialogs are derived. |
|
| | ||
|
The base class for LCL components which have an associated widget. |
|
| | ||
TComponent |
||
? | ||
TObject |
TCalendarDialog is a TExtCommonDialog descendant which implements a calendar dialog used to select a date from a TCalendar control. It provides a Date property that contains the date used when selecting a date using the Calendar control displayed in the dialog.
TCalendarDialog creates and configures a TForm instance that is displayed in the Execute method for the dialog. The form uses the Title, DialogPosition, DisplaySettings, and Date properties assigned in the class. A new TCalendar control is created for the form, and stored in the Calendar property. Methods which implement the event handlers for the calendar control are also assigned. The form instance is displayed modally, and the modal result is captured in the UserChoice property. Date is updated when a calendar date is selected while the form is active.
|
The common base class for custom drawn dialogs (Calculator and Calendar). |
|
|
The selected Date, for return to the main program. |
|
|
Specifies the position where the dialog is displayed. |
|
|
Contains the form displayed modally for the custom-drawn dialog. |
|
|
Configures and displays the form for the calendar dialog, and captures the results. |
|
|
TCalendar allows selection of a date from a calendar display. |