wwButton cancel or Modal result
Hi I try to set the cancel property in the button so that when you press ESC on a form that it change the modal to close and exit the form, can't find it or hows should I do it
Tab key is also not working om my forms in firemonkey
-
I think this is more general FireMonkey question. The way I would handle it is to use the OnKeyDown of the form and trap for the escape key.
procedure TwwLookupDialogForm.FormKeyDown(
Sender: TObject; var Key: Word;
var KeyChar: Char; Shift: TShiftState)
begin
if key=vkescape then
begin
ModalResult := mrcancel;
end
end
Please sign in to leave a comment.
Comments
2 comments