How do you bind keypress events to an entire canvas? 
Author Message
 How do you bind keypress events to an entire canvas?

I can bind a q key press to the main window after reading section 9.5 of
the FAQ but this doesn't seem to work for frames or canvases.


                            print"KEY:",$e->K,"\n";});

After looking around the bind method for a canvas takes different
parameters.  In the userguide.pod I saw how bind actions to tags in
canvases but I want to read key and button presses in any part of
the canvas.

Canvas tag binding seem to be bound like this:

                                      print"KEY:",$e->K,"\n";});

Is there some tag that applies to the entire canvas that I could use?

I'm using Perl 5.003 with Tk400.200 on AIX 3.2.

If you follow-up would you cc me.  I get news through Netcom's SLOW
feed.

- Brent LaVelle



Wed, 14 Apr 1999 03:00:00 GMT  
 How do you bind keypress events to an entire canvas?

: I can bind a q key press to the main window after reading section 9.5 of
: the FAQ but this doesn't seem to work for frames or canvases.


:                           print"KEY:",$e->K,"\n";});


                           print"KEY:",$e->K,"\n";});



Wed, 14 Apr 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem with binding events on TkPerl canvas

2. Binding mouse event to a canvas

3. help binding mouse events to canvas

4. binding an event to an item in a canvas widget

5. keypress and keyrelease as separate events

6. binding keypress to rectangle?

7. Binding KeyPress on a Text widget

8. Binding resize event

9. How to bind 'Back Space' event

10. Binding event to entry widget

11. binding an event to X

12. binding label event to checkbox

 

 
Powered by phpBB® Forum Software