3.5.2.1.37. ResizableTextArea

ResizableTextArea is a multi-line text editor field with the ability to change the size.

XML-name of the component: resizableTextArea.

ResizableTextArea mostly replicates the functionality of the TextArea component and has the following specific attributes:

  • resizableDirection – defines the way a user can change the size of the component unless the percentage size is set for the component.

    <resizableTextArea id="textArea" resizableDirection="BOTH"/>
    gui textField resizable

    There are four resize modes available:

    • BOTH – the component is resizable in both directions. BOTH is the default value. The component is not resizable if the percentage size is set for the component.

    • NONE – the component can not be resized.

    • VERTICAL – the component is resizable only vertically. The component can not be resized vertically if the percentage size is set for the component.

    • HORIZONTAL – the component is resizable only horizontally. The component can not be resized horizontally if the percentage width is set for the component.

    The area size change events can be tracked using the ResizeListener interface. For example:

    resizableTextArea.addResizeListener(resizeEvent ->
            notifications.create()
                    .withCaption("Resized")
                    .show());