示例#1
0
  def __init__(self, resizeable=None, *args, **kwargs):
    BaseTextArea.__init__(self, *args, **kwargs)

    if not resizeable in self._resizeable_valid:
      raise ValueError(
        'Invalid value for resizeable: {}, valid values are: {}'.format(
          repr(resizeable),
          ','.join(repr(v) for v in self._resizeable_valid)
          )
      )
    if resizeable:
      self.resizeable = 'resizeable-' + resizeable
示例#2
0
  def __init__(self, resizeable=None, rows=None, *args, **kwargs):
    BaseTextArea.__init__(self, *args, **kwargs)

    if resizeable not in self._resizeable_valid:
      raise ValueError(
        'Invalid value for resizeable: {}, valid values are: {!r}'
        ''.format(self._resizeable_valid)
      )
    if resizeable:
      self.resizeable = 'resizeable-' + resizeable
    else:
      self.resizeable = 'not-resizeable'

    if rows:
      self.rows = int(rows)