Monday, August 22, 2005

wxPython note: process tab end enter key events for TextCtrl in dialogs

When you place a TextCtrl in a dialog and catch the Key events for it, you will find that enter and tab key events are not processed. When you press tab key, the focus will be switched to the next widget.

The solution is setting the style for the TextCtrl. There are two styles, wx.TE_PROCESS_ENTER and wx.TE_PROCESS_TAB, which default to unset. They will help in processing events.

1 comment:

Paul Wells said...

Thanks! This helped