Rubsanpe Active Member Licensed User Longtime User May 7, 2019 #1 Hi, I'm trying to use CustomListView's ScrollToItem function to move the contents of the list to a new position. It is not working in the latest version of the CustomListView library. I have tested it in the example of the forum that uses the class instead of the library and in that case it works correctly. Any idea where the problem might be? I attach an example. Rubén Attachments CLV_ScrollToItem_Error.zip CLV_ScrollToItem_Error.zip 10.3 KB · Views: 551 Last edited: May 7, 2019
Hi, I'm trying to use CustomListView's ScrollToItem function to move the contents of the list to a new position. It is not working in the latest version of the CustomListView library. I have tested it in the example of the forum that uses the class instead of the library and in that case it works correctly. Any idea where the problem might be? I attach an example. Rubén
Erel B4X founder Staff member Licensed User Longtime User May 8, 2019 #2 Your project uses the old and deprecated CustomListView library. You should switch to xCustomListView.
Your project uses the old and deprecated CustomListView library. You should switch to xCustomListView.
Rubsanpe Active Member Licensed User Longtime User May 8, 2019 #3 Erel said: Your project uses the old and deprecated CustomListView library. You should switch to xCustomListView. Click to expand... Thank you for your reply, Erel. I chose badly the library in the example, in my project I am using the correct one. I upload an updated version with the latest version of xCustomListView (1.70) Rubén Attachments CLV_ScrollToItem_Error2.zip CLV_ScrollToItem_Error2.zip 10.3 KB · Views: 558
Erel said: Your project uses the old and deprecated CustomListView library. You should switch to xCustomListView. Click to expand... Thank you for your reply, Erel. I chose badly the library in the example, in my project I am using the correct one. I upload an updated version with the latest version of xCustomListView (1.70) Rubén
Erel B4X founder Staff member Licensed User Longtime User May 8, 2019 #4 You are seeing the behavior of the native ScrollView. It's layout is not immediately ready. Add Sleep(0) and it will work. For further discussion please start a new thread in the questions forum.
You are seeing the behavior of the native ScrollView. It's layout is not immediately ready. Add Sleep(0) and it will work. For further discussion please start a new thread in the questions forum.
klaus Expert Licensed User Longtime User May 8, 2019 #5 Add Sleep(0) before calling ScrollToItem. Code: Sleep(0) CustomListView1.ScrollToItem(20) Why do you use the legacy debugger and not the 'standard' rapid debugger?
Add Sleep(0) before calling ScrollToItem. Code: Sleep(0) CustomListView1.ScrollToItem(20) Why do you use the legacy debugger and not the 'standard' rapid debugger?
Erel B4X founder Staff member Licensed User Longtime User May 8, 2019 #6 klaus said: Why do you use the legacy debugger and not the 'standard' rapid debugger? Click to expand... How do you know it? It is not a project setting.
klaus said: Why do you use the legacy debugger and not the 'standard' rapid debugger? Click to expand... How do you know it? It is not a project setting.
Rubsanpe Active Member Licensed User Longtime User May 8, 2019 #7 Erel said: You are seeing the behavior of the native ScrollView. It's layout is not immediately ready. Add Sleep(0) and it will work. For further discussion please start a new thread in the questions forum. Click to expand... Thank you Erel. My first tests were putting Sleep in the code but I put it after calling ScrollToItem. Now it's working. Klaus in the example im using the default debuger options and it is not using the legacy debugger Thank you for your responses. Rubén
Erel said: You are seeing the behavior of the native ScrollView. It's layout is not immediately ready. Add Sleep(0) and it will work. For further discussion please start a new thread in the questions forum. Click to expand... Thank you Erel. My first tests were putting Sleep in the code but I put it after calling ScrollToItem. Now it's working. Klaus in the example im using the default debuger options and it is not using the legacy debugger Thank you for your responses. Rubén
klaus Expert Licensed User Longtime User May 8, 2019 #8 Erel said: How do you know it? It is not a project setting. Click to expand... I got a message, and thought that it was a project setting and not an IDE setting. I answered in a thread about the legacy debugger, set it and didn't remove it.
Erel said: How do you know it? It is not a project setting. Click to expand... I got a message, and thought that it was a project setting and not an IDE setting. I answered in a thread about the legacy debugger, set it and didn't remove it.
Erel B4X founder Staff member Licensed User Longtime User May 8, 2019 #9 klaus said: I answered in a thread about the legacy debugger, set it and didn't remove it. Click to expand... That was my guess.
klaus said: I answered in a thread about the legacy debugger, set it and didn't remove it. Click to expand... That was my guess.