R Revisable5987 Member Licensed User Jun 16, 2020 #1 If I set a button as Visible = False the CLV will jump to the top. I can make the clv return to the correct place with 'VPosition' but the list first moves to the top and then to where I want it. Is there anything I can do to stop the clv moving in the first place? using sleep(300) helps, but not always. Example project attached. Scroll to the bottom and press the button. Attachments example.zip example.zip 3.4 KB · Views: 449
If I set a button as Visible = False the CLV will jump to the top. I can make the clv return to the correct place with 'VPosition' but the list first moves to the top and then to where I want it. Is there anything I can do to stop the clv moving in the first place? using sleep(300) helps, but not always. Example project attached. Scroll to the bottom and press the button.
LucaMs Expert Licensed User Longtime User Jun 16, 2020 #2 I think that the best you can obtain is using: B4X: Copy btn.Visible = False Sleep (0) CustomListView1.JumpToItem(CustomListView1.Size - 1) It seems to be a bug, so without changing the xCustomListView source code...! Upvote 0
I think that the best you can obtain is using: B4X: Copy btn.Visible = False Sleep (0) CustomListView1.JumpToItem(CustomListView1.Size - 1) It seems to be a bug, so without changing the xCustomListView source code...!
Erel B4X founder Staff member Licensed User Longtime User Jun 16, 2020 #3 Tricky indeed. It is related to the focus moving from the clicked button to the first button. Workaround is to explicitly set the focus: Code: Copy btn.Visible = False p.RequestFocus Upvote 0
Tricky indeed. It is related to the focus moving from the clicked button to the first button. Workaround is to explicitly set the focus: Code: Copy btn.Visible = False p.RequestFocus
gregchao Active Member Licensed User Longtime User Dec 12, 2020 #5 I ran into a similar problem where I wanted to jump to the bottom of list and it would not respond. After stuggling a little, I solved it by using: B4X: Copy Dim n As Int = CLVConversation.size CLVConversation.JumpToItem(n - 1) 'next 2 lines needed to ensure jumpto last line Sleep(0) CLVConversation.JumpToItem(n - 1) I am not quite sure why it works though.... Upvote 0
I ran into a similar problem where I wanted to jump to the bottom of list and it would not respond. After stuggling a little, I solved it by using: B4X: Copy Dim n As Int = CLVConversation.size CLVConversation.JumpToItem(n - 1) 'next 2 lines needed to ensure jumpto last line Sleep(0) CLVConversation.JumpToItem(n - 1) I am not quite sure why it works though....