Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am having a TextArea within the listItem element and I have fixed the TextArea height.

When the listview is displayed, TextArea within each row, does not have a scroll.

Hence TextArea shows possible content within its height and rest of the contents is Lost.

Please find the snippet of Custom ListItem element.

Item {
    id: orderRow
    width: parent.width
    height: units.gu(25)

    property alias tableText: tableDetailsText.text
    property alias orderText: orderDetailsText.text

    signal yesConfirmation()

    Rectangle{
        id: orderCompleteRect
        width:parent.width/5
        height: parent.height
        anchors.left: parent.left
        anchors.top: parent.top
        Image{
            source: "icons/bg.png"
            width: parent.width
            height: parent.height
            anchors.fill: parent
        }
        Button{
            id: orderServedBtn
            anchors.centerIn: parent
            width: parent.width
            height: units.gu(5)
            text: "Order Complete"

            onClicked: {
                PopupUtils.open(dialog, orderRow)
                }
            }
        }

    Rectangle{
        id: orderDetailsMainRect
        width:parent.width - orderCompleteRect.width
        height: parent.height
        anchors.left: orderCompleteRect.right
        anchors.top: parent.top
        Image{
            source: "icons/bg.png"
            width: parent.width
            height: parent.height
            anchors.fill: parent
        }

        Rectangle{
            id: tableDetailsRect
            height: parent.height
            width: parent.width/3
            anchors.left: parent.left
            anchors.top: parent.top
            enabled: false
            border.color: "black"
            Image{
                source: "icons/bg.png"
                width: parent.width
                height: parent.height
                anchors.fill: parent
            }
            TextArea{
                id: tableDetailsText
                width: parent.width
                height: parent.height
                highlighted: true
                font.pointSize: 15
                font.bold: true
                font.family: "verdana"
                color: "black"
            }
        }
        Rectangle{
            id: orderDetailsRect
            height: parent.height
            width: parent.width - tableDetailsRect.width
            anchors.left: tableDetailsRect.right
            anchors.top: parent.top
            enabled: false
            Image{
                source: "icons/bg.png"
                width: parent.width
                height: parent.height
                anchors.fill: parent
            }
            TextArea{
                id: orderDetailsText
                width: parent.width
                height: parent.height
                highlighted: true
                font.pointSize: 15
                font.bold: true
                font.family: "verdana"
                color: "black"
            }
        }
    }
}
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.