PyGTK problem

Dave Reed dreed at capital.edu
Fri Feb 22 13:32:28 EST 2002


> From: Rajarshi Guha <rxg218 at psu.edu>
> 
> Hi,
>   I'm not sure whether this is the right place to ask this....
> I have a PyGTK app built using libglade which basically consists of a 
> window containiong a text entry box.
> 
> I would like to take an action when the Return key is pressed. I made a 
> signal handler for the 'changed' even in GtKEditable. However the callback 
> is triggered whenever any text is entered into the box. Which is OK - but 
> the callback does'nt get called when a Return is entered.
> 
> I have got around it by adding a button - but it seems kludgy compared to 
> just pressing the Return key.
> 
> Does anybody have any suggestions?

Use the "activate" signal, not the "changed" signal.

Dave




More information about the Python-list mailing list