[pygtk] Event ordering

Walter Leibbrandt walter at translate.org.za
Tue Jan 27 17:03:34 WST 2009


Yang Zhang wrote:
> Yang Zhang wrote:
>> Hi, I'm trying to position a pop-up Window to always be directly under 
>> an Entry box, but I'm not sure what signal(s) to react to.
>> For instance, I tried entry.connect_after('focus-in-event', ...) to 
>> handle the initial positioning (I also hide the window on 
>> 'focus-out-event'), and that mostly seems to work, but if I resize the 
>> window, the reaction is too early since the geometry of the entry is not 
>> yet fully updated.  How can I handle this situation appropriately?
> Another example: I'd like to set the cursor position in the entry to the 
> end of the text whenever focus changes to the entry, but doing this from 
> focus-in-event doesn't work (the entire text still gets highlighted).

Walter Leibbrandt                  http://translate.org.za/blogs/walter
Software Developer                                  +27 12 460 1095 (w)

Recent blogs:
* Virtaal's MVCisation
* Things that changed the way I code
* Switching from Subversion to git

More information about the pygtk mailing list