×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2011
    Location
    Lebanon
    Posts
    59

    Enable the listView to scroll beyond the footer

    Hi,
    I have a listview that contains a header, delegate and the footer.
    The footer is somehow big and I need the listView to show all this footer not drag a little beyond the last delegate element of the list, how can I achieve this ?

  2. #2
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Enable the listView to scroll beyond the footer

    Have you defined the fotter height?
    Does this code work for you?


    Rectangle {
    anchors.fill: parent
    ListView {
    clip: true; spacing: 1
    width: parent.width
    height: parent.height
    // It works without Snapping
    snapMode: ListView.SnapToItem
    model: listModel
    delegate: listDelegate
    footer: footerAndHeader
    header: footerAndHeader
    }

    ListModel {
    id: listModel
    ListElement {name: "Dogs"}
    ListElement {name: "Cats"}
    ListElement {name: "Birds"}
    ListElement {name: "Snails"}
    ListElement {name: "Horses"}
    ListElement {name: "Bugs?"}
    }

    Component {
    id: listDelegate
    Rectangle {
    width: parent.width
    height: 60
    gradient: Gradient {
    GradientStop {
    position: 0.00;
    color: "#f9f9f9";
    }
    GradientStop {
    position: 1.00;
    color: "#c4c4c4";
    }
    }
    Text {
    anchors.centerIn: parent
    text: name
    }
    }
    }

    Component {
    id: footerAndHeader
    Rectangle {
    width: parent.width
    height: 400
    gradient: Gradient {
    GradientStop {
    position: 0.00;
    color: "#6d6d6d";
    }
    GradientStop {
    position: 1.00;
    color: "#222222";
    }
    }
    }
    }

    }

  3. #3
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: Enable the listView to scroll beyond the footer

    not sure i have understand correctly but it seems to me you need to specify a bottomMargin
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  4. #4
    Registered User
    Join Date
    Sep 2011
    Location
    Lebanon
    Posts
    59

    Re: Enable the listView to scroll beyond the footer

    I didn't thought it was as simple as that !!!
    Thanks gnuton
    Success is when you realize obstacles you face are challenges to help you become better - and your response equals the challenge.

Similar Threads

  1. Replies: 0
    Last Post: 2010-12-07, 11:34
  2. Creating a new entry on the footer menu
    By LunarMoon in forum Symbian
    Replies: 2
    Last Post: 2010-05-28, 20:20
  3. Replies: 1
    Last Post: 2009-10-28, 06:17
  4. How to get Screen Footer Length
    By kalgi in forum Symbian
    Replies: 5
    Last Post: 2009-05-13, 11:55
  5. Help... my footer do not draw
    By sudeepa2005 in forum Symbian
    Replies: 0
    Last Post: 2009-03-12, 07:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×