IBM VA close window upon key pressed event 
Author Message
 IBM VA close window upon key pressed event

I would like to do something which seems trivial, but I can't figure it
out.
When the PF-12 key is pressed, I want to close a window.
I found the CwKeyEvent class, but don't know how to apply it.
Sample code would be nice.
Any help would be greatly appreciated...

I'm running IBM VA Team 3.0 on Win NT 3.51

Thanks,
        Sorin



Sat, 02 Jan 1999 03:00:00 GMT  
 IBM VA close window upon key pressed event

Quote:

>When the PF-12 key is pressed, I want to close a window.
>Sample code would be nice.

See the section titled "Event Handlers" starting on p. 188 of the IBM ST Prog Reference.
Basically, on the #openedWidget event, you can ask the window for its
primaryWidget and add event handler to it to trap key press events.  In that event
handler you can ask which key was pressed and act accordingly (i.e. #closeWidgetCommand).

Hope this helps,
David Whiteman
IBM VisualAge for Smalltalk Technical Support



Sun, 03 Jan 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Key press events on a window

2. CW2.0 App crashes upon window closing PROBLEM

3. Trapping a key press event

4. How to capture key-presses (keyboard-presses)???

5. Make windows believe that a key was pressed or released

6. binding problem: destroying toplevel windows by pressing a key

7. Closing Window (?CancelButton) while in event.accepted ...help!

8. Intercept close window event in Vispro?

9. Can i trap a close window event?

10. Tkinter: trapping window-close event?

11. The close window event

12. wxPython question: window closing event

 

 
Powered by phpBB® Forum Software