Table scroll position

hi! how can i set the scroll position of a table on the top using a button?
thankyou in advance

There are two ways to do it:

1.Using Actions Editor, set Current index to -2 and then with short delay set Current index to -1 (or to 0 if you need to select first item)

2.Using Code Editor, scroll table without changing the current index

import QtQuick 2.5

Item {
    Connections {
        target: widget.scriptAdaptor
        onEventItemClicked: {
            pageUi.getBlockByName("Table 1").contentUi.containerLoader.item.contentY = 0
        }
    }
}

See the example scroll_table_top.pma (534.0 KB)

1 Like

Thank you very much!


Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.