Package diffpy :: Package pdfgui :: Package gui :: Package wxExtensions :: Module textctrlutils
[hide private]
[frames] | no frames]

Module textctrlutils

source code

This module contains utilities that can be used with wxTextCtrls.



Functions [hide private]
 
textCtrlAsGridCell(panel, event)
Process a textCtrl key event as if the textCtrl was a grid cell.
source code
Variables [hide private]
  __id__ = '$Id: textctrlutils.py 2981 2009-04-02 02:13:58Z farr...
Function Details [hide private]

textCtrlAsGridCell(panel, event)

source code 
Process a textCtrl key event as if the textCtrl was a grid cell.

This catches ESC and ENTER events in textCtrls and processes them as if the
textCtrl were a grid cell. This method can be bound to the wx.EVT_KEY_DOWN
event of any textCtrl. See phaseconfigurepanel.py in diffpy.pdfgui.gui for
an example.

ESC     --  Cancel the edit and highlight the text. This requires that
            panel has a _focusedText attribute that stores the previous value.
ENTER   --  Confirm the edit and move to the next cell (the default TAB
            behavior).


Variables Details [hide private]

__id__

Value:
'$Id: textctrlutils.py 2981 2009-04-02 02:13:58Z farrowch $'