TdxCustomWizardControl.OnHandleChildControlKey Event
Enables you to respond to keystrokes that the focused child control accepts.
Declaration
property OnHandleChildControlKey: TdxWizardControlHandleChildControlKeyEvent read; write;
Remarks
This event occurs immediately after the focused child control on a wizard page processes a keystroke. You can handle this event to forbid the wizard control to respond to certain keystrokes while a specific child control on a wizard page has input focus. For instance, you can handle the event to allow a user to press the Enter, Esc, and Ctrl+A keystrokes to edit text in a memo editor on a wizard page, and avoid unintended navigation between wizard pages.
procedure TMyForm.dxWizardControl1HandleChildControlKey(Message: TCMChildKey; var AHandled: Boolean);
begin
AHandled :=
(((Message.CharCode = VK_ESCAPE) or // Checks if the Esc key is pressed
(Message.CharCode = VK_RETURN) or // Checks if the Enter key is pressed
((Message.CharCode = 65) and (ssCtrl in KeyboardStateToShiftState)) and // Checks if the Ctrl+A key combination is pressed (the "A" key's virtual key code is 65)
(Message.Sender is TcxCustomInnerMemo)); // Checks whether a memo on a wizard page accepts one of the three listed keystrokes
end;
Refer to the TdxWizardControlHandleChildControlKeyEvent procedural type description for detailed information on all parameters accessible within an OnHandleChildControlKey event handler.
Note
The OnHandleChildControlKey event does not occur if a keystroke message’s sender is a wizard control or one of its pages.