Rookie question.
I have two ListViews that I need to synchronize when the user clicks on an item, the second list will select the same index. So far I have no problem.
The problem is the visibility of the selected item. (or the position of the ScrollBar?)
How can I get both lists to show the item in the same location? (Easy way?)
Thanks a Lot!
Yes, thank you, sir. I know that and using it.
But when I click on an Item, both scroll to the top of the list (FirstVisible Item).
My question is how to keep the same position in both when clicking, without moving it to the top of the list.
Sub CustomListView2_ScrollChanged (Offset As Int)
CustomListView1.sv.ScrollViewOffsetY=Offset
End Sub
Sub CustomListView1_ScrollChanged (Offset As Int)
CustomListView2.sv.ScrollViewOffsetY=Offset
End Sub
if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then
CustomListView2.sv.ScrollViewOffsetY = CustomListView1.sv.ScrollViewOffsetY
End if
Paste this inside clv 2 item click event
B4X:
if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then
CustomListView1.sv.ScrollViewOffsetY = CustomListView2.sv.ScrollViewOffsetY
End if
if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then
CustomListView2.sv.ScrollViewOffsetY = CustomListView1.sv.ScrollViewOffsetY
End if
Paste this inside clv 2 item click event
B4X:
if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then
CustomListView1.sv.ScrollViewOffsetY = CustomListView2.sv.ScrollViewOffsetY
End if