B4J Question Drag CustomListView up and down using mouse click

aeric

Expert
Licensed User
Longtime User
I think I need to modify CustomListView to support this feature.
I want to drag the panel like a ScrollPane.
Maybe someone already have a solution?
 

aeric

Expert
Licensed User
Longtime User
Thanks Paul for the example code for using ScrollPane. It will be very useful.

However, I choose Steve's answer for my question.
Even though I need to add some code for CustomListview, I prefer to use it instead because of some advantages.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Here is an update.

I get an error when running the code on Linux.
SBV is null.
B4X:
Dim visibleHeight As Double = SBV.RunMethod("getVisibleAmount", Null) * contentHeight
I changed it to:
B4X:
Dim visibleHeight As Double = GetScrollBar(SP, "VERTICAL").RunMethod("getVisibleAmount", Null) * contentHeight
And it is now working on Linux too.
SBV can be removed.

My code is updated on GitHub https://github.com/pyhoon/CLVMouseScroll-B4J
 
Last edited:
Upvote 0
Top