parameters: (self, event)
docstring: Handles the ``wx.EVT_KEY_UP`` event for :class:`TreeTextCtrl`.
  
          :param `event`: a :class:`KeyEvent` event to be processed.
docstring_summary: Handles the ``wx.EVT_KEY_UP`` event for :class:`TreeTextCtrl`.
docstring_tokens: Handles the wx . EVT_KEY_UP event for : class : TreeTextCtrl .
function: def OnKeyUp(self, event):
          """
          Handles the ``wx.EVT_KEY_UP`` event for :class:`TreeTextCtrl`.
  
          :param `event`: a :class:`KeyEvent` event to be processed.
          """
  
          if not self._finished:
  
              # auto-grow the textctrl:
              parentSize = self._owner.GetSize()
              myPos = self.GetPosition()
              mySize = self.GetSize()
  
              dc = wx.ClientDC(self)
              sx, sy, dummy = dc.GetMultiLineTextExtent(self.GetValue() + "M")
  
              if myPos.x + sx > parentSize.x:
                  sx = parentSize.x - myPos.x
              if mySize.x > sx:
                  sx = mySize.x
                  
              self.SetSize((sx, -1))
              self._currentValue = self.GetValue()
  
          event.Skip()
function_tokens: def OnKeyUp ( self , event ) : if not self . _finished : # auto-grow the textctrl: parentSize = self . _owner . GetSize ( ) myPos = self . GetPosition ( ) mySize = self . GetSize ( ) dc = wx . ClientDC ( self ) sx , sy , dummy = dc . GetMultiLineTextExtent ( self . GetValue ( ) + "M" ) if myPos . x + sx > parentSize . x : sx = parentSize . x - myPos . x if mySize . x > sx : sx = mySize . x self . SetSize ( ( sx , - 1 ) ) self . _currentValue = self . GetValue ( ) event . Skip ( )