how to bind return key to entry widget 
Author Message
 how to bind return key to entry widget

I would like to bind the return key to  an entry widget so a user has
the option of either using the mouse to activate the callback or
pressing the return key. How is this done? I can find no simple
explanation of this in Mastering Perl/Tk, which, I suppose, should
motivate me to read the relevant sections.
Thanks,
{*filter*} Fell


Thu, 16 Sep 2004 05:55:06 GMT  
 how to bind return key to entry widget

Quote:

> I would like to bind the return key to  an entry widget so a user has
> the option of either using the mouse to activate the callback or
> pressing the return key. How is this done? I can find no simple
> explanation of this in Mastering Perl/Tk, which, I suppose, should
> motivate me to read the relevant sections. Thanks,
>{*filter*} Fell

try widget->bind("<Enter>",callback);
where widget is  the widget in guestion and callback is the routine you
want to run


Thu, 16 Sep 2004 05:36:21 GMT  
 how to bind return key to entry widget

Quote:



> > I would like to bind the return key to  an entry widget so a user has
> > the option of either using the mouse to activate the callback or
> > pressing the return key. How is this done? I can find no simple
> > explanation of this in Mastering Perl/Tk, which, I suppose, should
> > motivate me to read the relevant sections. Thanks,
> >{*filter*} Fell
> try widget->bind("<Enter>",callback);
> where widget is  the widget in guestion and callback is the routine you
> want to run

No, it's the "<Return>" event.

Regards,
        Slaven

--

need xpm or ppm output from GD?
        http://www.*-*-*.com/ ::Convert



Fri, 17 Sep 2004 03:14:47 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. $widget->bind returns one binding only

2. Binding event to entry widget

3. Mouse Click Bind for an Entry Widget

4. binding a comand on an entry widget (again a newbie question)

5. Bind, Entry widgets and the MS Windows Manager

6. Bind & Entry widgets

7. binding <Return> on an Entry

8. newbie help with anonymous subroutine syntax for text widget key binding

9. Binding keys in Text widget

10. Binding the TAB key in the Text widget

11. Binding the TAB key in a Text widget

12. Binding Return Key

 

 
Powered by phpBB® Forum Software