Jorge M A Well-Known Member Licensed User Longtime User Aug 9, 2019 #1 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!
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!
EnriqueGonzalez Expert Licensed User Longtime User Aug 9, 2019 #2 hi! listview has the method ScrollTo. Upvote 0
Jorge M A Well-Known Member Licensed User Longtime User Aug 9, 2019 #3 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. Upvote 0
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.
Jorge M A Well-Known Member Licensed User Longtime User Aug 9, 2019 #4 Ok, my basic, solution based on Offset: Code: Copy Sub CustomListView2_ScrollChanged (Offset As Int) CustomListView1.sv.ScrollViewOffsetY=Offset End Sub Sub CustomListView1_ScrollChanged (Offset As Int) CustomListView2.sv.ScrollViewOffsetY=Offset End Sub Thanks! Upvote 0
Ok, my basic, solution based on Offset: Code: Copy Sub CustomListView2_ScrollChanged (Offset As Int) CustomListView1.sv.ScrollViewOffsetY=Offset End Sub Sub CustomListView1_ScrollChanged (Offset As Int) CustomListView2.sv.ScrollViewOffsetY=Offset End Sub Thanks!
Brandsum Well-Known Member Licensed User Aug 9, 2019 #5 Paste this inside clv 1 item click event Code: Copy if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then CustomListView2.sv.ScrollViewOffsetY = CustomListView1.sv.ScrollViewOffsetY End if Paste this inside clv 2 item click event Code: Copy if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then CustomListView1.sv.ScrollViewOffsetY = CustomListView2.sv.ScrollViewOffsetY End if Upvote 0
Paste this inside clv 1 item click event Code: Copy if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then CustomListView2.sv.ScrollViewOffsetY = CustomListView1.sv.ScrollViewOffsetY End if Paste this inside clv 2 item click event Code: Copy if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then CustomListView1.sv.ScrollViewOffsetY = CustomListView2.sv.ScrollViewOffsetY End if
Jorge M A Well-Known Member Licensed User Longtime User Aug 9, 2019 #6 Brandsum said: Paste this inside clv 1 item click event Code: Copy if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then CustomListView2.sv.ScrollViewOffsetY = CustomListView1.sv.ScrollViewOffsetY End if Paste this inside clv 2 item click event Code: Copy if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then CustomListView1.sv.ScrollViewOffsetY = CustomListView2.sv.ScrollViewOffsetY End if Click to expand... Thank You Man! Upvote 0
Brandsum said: Paste this inside clv 1 item click event Code: Copy if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then CustomListView2.sv.ScrollViewOffsetY = CustomListView1.sv.ScrollViewOffsetY End if Paste this inside clv 2 item click event Code: Copy if CustomListView1.sv.ScrollViewOffsetY <> CustomListView2.sv.ScrollViewOffsetY then CustomListView1.sv.ScrollViewOffsetY = CustomListView2.sv.ScrollViewOffsetY End if Click to expand... Thank You Man!