Reputation: 1
I have a firemonkey application that opens forms that are embedded into controls on the main form. I am trying to use the keydown event on the embedded form but the event doesn't fire. Other posts recommend overriding the keydown event on the form, but this only works when it's done on the main form, even when overridden the event is never triggered on the embedded form.
Thanks
Upvotes: 0
Views: 1913
Reputation: 75
Simply use the main forms' OnKeyDown event to scan child controls for a TForm descendant and resend the "onkeydown" to the contained form.
Should be a simple routine - if you put it into a shared unit you could use it in all forms to ensure keypresses propagate to contained forms.
Upvotes: 1