TCalendarPopupForm.CalendarKeyDown procedure
Implements the OnKeyDown event handler for the Calendar control.
Declaration
procedure CalendarKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState)Arguments
Sender | Object for the event notification; the Calendar control in this case. |
Key | Virtual key code examined in the method. |
Shift | Virtual key modifier examined in the method. |
Description
CalendarKeyDown is a procedure which implements the
OnKeyDown event handler for the
Calendar control. The
method ensures that the key down virtual key code represented by
Key and
Shift is applied to the Calendar control, and
includes:
- VK_RETURN, VK_SPACE
- Calls
ReturnDateto apply the selected date value in Month view, and signals theOnReturnDateevent handler. - VK_ESCAPE
- Calls
Closeto close the form.
If the virtual key code is handled in the method, the value in Key is set to zero (0). Otherwise, it is retained for use in event handlers at the Form or Application level.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
