Misterbates Active Member Licensed User Aug 2, 2017 #1 I'm wanting to include CustomListView in a project but I need to be able to load some list items then JumpToItem to have a specific item shown from the items I've loaded. Adding the following into Activity_Resume in the CustomListView example has no visible effect. Is there something else I should be doing to programmatically show the last list item? Code: Copy Sub Activity_Resume clv1.JumpToItem(clv1.GetSize - 1) clv1.ScrollToItem(clv1.GetSize - 1) End Sub
I'm wanting to include CustomListView in a project but I need to be able to load some list items then JumpToItem to have a specific item shown from the items I've loaded. Adding the following into Activity_Resume in the CustomListView example has no visible effect. Is there something else I should be doing to programmatically show the last list item? Code: Copy Sub Activity_Resume clv1.JumpToItem(clv1.GetSize - 1) clv1.ScrollToItem(clv1.GetSize - 1) End Sub
mangojack Expert Licensed User Longtime User Aug 2, 2017 #2 try ... Code: Copy Sleep(100) clv1.ScrollToItem(clv1.GetSize -1) Upvote 0
Misterbates Active Member Licensed User Aug 2, 2017 #3 so why does that work? and do I need to call sleep() before every call to ScrollToItem (or JumpToItem)? Upvote 0
so why does that work? and do I need to call sleep() before every call to ScrollToItem (or JumpToItem)?
mangojack Expert Licensed User Longtime User Aug 2, 2017 #5 Erel said: Does it work? Click to expand... Yes Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Aug 2, 2017 #6 It takes ScrollView a few milliseconds to "layout itself". Upvote 0
Misterbates Active Member Licensed User Aug 2, 2017 #7 It does work ... just curious why it should? Upvote 0
mangojack Expert Licensed User Longtime User Aug 2, 2017 #8 Erel said: It takes ScrollView a few milliseconds to "layout itself". Click to expand... After another day of .." Punching away with B4A" It will only take a few milliSeconds to "layout myself" Sorry .... could't resist. Last edited: Aug 2, 2017 Upvote 0
Erel said: It takes ScrollView a few milliseconds to "layout itself". Click to expand... After another day of .." Punching away with B4A" It will only take a few milliSeconds to "layout myself" Sorry .... could't resist.