Event lost during runtime

Malfunction

Well-known member
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 doesnt 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 isnt notified that the key was pressed?
 
Originally posted by Merrion
If you check the checkbox it then has the input focus so keystrokes go to it ... so presumably the panel isnt notified that the key was pressed?


I also added that event to the form itself and the keyevent also doesnt 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 Im 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