Sign in Join
FPDoc Onlineexperiment

TCalendarPopupForm.CalendarKeyDown procedure

Member of TCalendarPopupFormIn unit CalendarPopup

Implements the OnKeyDown event handler for the Calendar control.

Declaration

pascal
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 ReturnDate to apply the selected date value in Month view, and signals the OnReturnDate event handler.
VK_ESCAPE
Calls Close to 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.