Event lost during runtime

Malfunction

Junior Contributor
Joined
Dec 8, 2003
Messages
203
Location
Berlin, Germany
Hi,

I have a panel that zooms in and out by pressing the F1 key.
That event works fine unless I click on a checkbox placed on the panel causing the panel not to react to the keyevent anymore.
The radiobutton doesn't change any conditions in my app.
 
If you check the checkbox it then has the input focus so keystrokes go to it ... so presumably the panel isn't notified that the key was pressed?
 
Merrion said:
If you check the checkbox it then has the input focus so keystrokes go to it ... so presumably the panel isn't notified that the key was pressed?


I also added that event to the form itself and the keyevent also doesn't work when I click on the panel afterwards.
Since the event is added to the form it should be caught any time no matter which control has the focus?

correct me if I'm wrong....
 
Since the event is added to the form it should be caught any time no matter which control has the focus?

This is true only if the KeyPreview property of the form is set to true. It is set to false by default, set it to true and the form will fire the event regardless of the control having the focus...
 
Back
Top