Sign in Join
FPDoc Onlineexperiment

TTimePopupForm.GridsKeyDown procedure

Member of TTimePopupFormIn unit TimePopup

Implements the OnKeyDown event handler for grid controls on the form.

Declaration

pascal
procedure GridsKeyDown(Sender: TObject; var Key: Word; 
 Shift: TShiftState)

Arguments

Sender

Object for the event notification.

Key

Virtual key code examined in the method.

Shift

Key Modifier examined in the method.

Description

GridsKeyDown ensures that the virtual key in Key and Shift is applied, when required. GridsKeyDown calls for form methods for the following:

VK_ESC
Calls the close method to close the Form.
VK_RETURN, VK_SPACE
Call ReturnTime to validate/update the time value, and close the Form.

When Key is handled in the method, it is set to zero (0). Otherwise, it is retained for use in Form or Application key events.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.