During my tries to get the scrollbar position of a ListView, I made a little library. It wraps a Listview (based upon the current B4A ListView, so 100% compatible) exposing the following functions and events:
FirstVisibleItem: Gets or sets the first visible item
LastVisibleItem: Gets the last visible item
Scrolled (firstVisibleItem as Int, visibleItemCount as Int, totalItemCount as Int)
ScrollStateChanged (ScrollState as Int)
I made a demo to illustrate a possible use of these new events. With this library, creating a ScrollPanel for a ListView is fairly easy (with a limitation: the SP cannot display its text on the fastscroll button).
This library is provided as is and won't be updated (except to fix bugs). It's the remains of an abandoned work.
FirstVisibleItem: Gets or sets the first visible item
LastVisibleItem: Gets the last visible item
Scrolled (firstVisibleItem as Int, visibleItemCount as Int, totalItemCount as Int)
ScrollStateChanged (ScrollState as Int)
I made a demo to illustrate a possible use of these new events. With this library, creating a ScrollPanel for a ListView is fairly easy (with a limitation: the SP cannot display its text on the fastscroll button).
This library is provided as is and won't be updated (except to fix bugs). It's the remains of an abandoned work.
Attachments
Last edited: