    def __init__(self, label=None, name=None, on_change=None, validator=None, hide_char=None,
                 max_length=None, readonly=False, **kwargs):
        """
        :param label: An optional label for the widget.
        :param name: The name for the widget.
        :param on_change: Optional function to call when text changes.
        :param validator: Optional definition of valid data for this widget.
            This can be a function (which takes the current value and returns True for valid
            content) or a regex string (which must match the entire allowed value).
        :param hide_char: Character to use instead of what the user types - e.g. to hide passwords.
        :param max_length: Optional maximum length of the field.  If set, the widget will limit
            data entry to this length.
        :param readonly: Whether the widget prevents user input to change values.  Default is False.

        Also see the common keyword arguments in :py:obj:`.Widget`.
        """
        super().__init__(name, **kwargs)
        self._label = label
        self._column = 0
        self._start_column = 0
        self._on_change = on_change
        self._validator = validator
        self._hide_char = hide_char
        self._max_length = max_length
        self._readonly = readonly
:param label: An optional label for the widget.
:param name: The name for the widget.
:param on_change: Optional function to call when text changes.
:param validator: Optional definition of valid data for this widget.
This can be a function (which takes the current value and returns True for valid
content) or a regex string (which must match the entire allowed value).
:param hide_char: Character to use instead of what the user types - e.g. to hide passwords.
:param max_length: Optional maximum length of the field.  If set, the widget will limit
data entry to this length.
:param readonly: Whether the widget prevents user input to change values.  Default is False.

Also see the common keyword arguments in :py:obj:`.Widget`.
asciimatics/widgets/text.py