[Dev] enter pressed ends AE editing

John Anderson john at osafoundation.org
Wed Mar 9 09:59:36 PST 2005


Hi Bryan:

How about this solution for your need to have the AEs end editing when 
enter is pressed:

In ControlBlocks.py, in wxAEBlock's  createControl, add handler for 
getting the wx key event, just like we do for noticing focus changes.

In the handler for key events look for return and if we get one call 
EndControlEdit the same way we do for loosing focus, otherwise do 
event.Skip() (which means you didn't handle the event)

This solution moves the decision from the AE to the wxAEBlock, which 
works for now, is easy, is constent witht the way we handle loose focus, 
but might not work when you want to let the AE be in control of the 
decision.

John



More information about the Dev mailing list