0

I have my own ChatInput component that contains TextArea wrapped with ScrollView that allows it to grow when you type a lot of text and I want to make it grow upwards but failing to do so. Is there any way to make it grow upwards? I tried 2 methods but none of them worked:

  1. Make column fill whole height and calculate empty space at the top manually as in snippet below, but somehow it seems the height is not updated dynamically and column doesn't even fill whole available height
  2. Make ColumnLayout align to the bottom, but then ChatInput grows downwards out of the window

/*

*/
Rectangle {
    color: "#ff000000"
    height: 600
    width: 400
    property alias settings_button: settings_button

    RowLayout {
        anchors.fill: parent

        ColumnLayout {
            id: content
            Layout.fillWidth: true
            Layout.fillHeight: true

            Rectangle {
                height: content.height - message.height - input.height
            }

            ChatLastMessage {
                id: message
                Layout.fillWidth: true
            }

            ChatInput {
                id: input
                Layout.fillWidth: true
                Layout.bottomMargin: 10
            }
        }

        // Other stuff

    }

}

Minimum size Maximum size

Yaroslav Shulyak
  • 151
  • 1
  • 12

0 Answers0