code: function (settings) {
          var self = this;
  
          self._super(settings);
  
          self.classes.add('textbox');
  
          if (settings.multiline) {
            self.classes.add('multiline');
          } else {
            self.on('keydown', function (e) {
              var rootControl;
  
              if (e.keyCode == 13) {
                e.preventDefault();
  
                // Find root control that we can do toJSON on
                self.parents().reverse().each(function (ctrl) {
                  if (ctrl.toJSON) {
                    rootControl = ctrl;
                    return false;
                  }
                });
  
                // Fire event on current text box with the serialized data of the whole form
                self.fire('submit', { data: rootControl.toJSON() });
              }
            });
  
            self.on('keyup', function (e) {
              self.state.set('value', e.target.value);
            });
          }
        }
docs: Constructs a instance with the specified settings.
  
  @constructor
  @param {Object} settings Name/value object with settings.
  @setting {Boolean} multiline True if the textbox is a multiline control.
  @setting {Number} maxLength Max length for the textbox.
  @setting {Number} size Size of the textbox in characters.