2023-12-01 01:24 AM
Hey
I have 5000 data that i want to display it in scroll list , means total index of scroll list is 5000
so How can i manage it in scrollable containers.
I have tried after some data(1000) its not supported please let me know solution
2023-12-08 05:49 AM - edited 2023-12-08 05:51 AM
Hello @APate.18 ,
I have seen you made 2 other threads recently :
- November 30th of 2023
- November 25th of 2023
Are they about the same project?
Note that you can edit a post, this would help us (and other people reading this thread) understand the issue.
To summarize your project : you want to have a list of 5000 items on one side and on the other side have a text entry to allow the user to search for a specific item in that list.
Since the list is so big, do you want the user to be able to scroll the list or is the search bar the only/preferred way of finding an item?
I see 2 potential solutions.
1. Use a scroll wheel
A scroll wheel can contain up to 32767 (int16) elements.
Since you want to put 5000 elements, the wheel will be so big that the part shown on the screen will appear straight like a scroll list.
There is already a function to jump to an element of the wheel : animateToItem(int16_t itemIndex, int16_t animationSteps =-1).
Here is the API documentation of the scroll wheel widget : Scroll wheel API documentation
2. Only display the element found by the search bar
If you do not need the user to be able to scroll the list, you could only display the element referred to by the search bar.
This could be done either by having a single element (such as a button with label) and updating it's value when a search is successful (updating the label to the element found it that case), you would store your items in a vector or array that the search bar go through.
This could also be done by having your 5000 elements set as invisible and when a search is successful, set the element to visible.
Hope this helps.
Don’t hesitate to give us a feedback, tell us if this solved your issue or give more precisions about your project so we can better help you.
2023-12-08 08:35 PM
How can i show scroll bar on right hand side of screen (from same project)
2023-12-11 01:29 AM
Hello @APate.18 ,
1 .
This question has been discussed in this post : How to realize scroll bar effect in ScrollList?
Romain explain that you can use a scrollable container which have a scroll bar on the side.
This is shown in this Youtube video.
2 .
He also explain that another way of achieving the same result would be to copy the code of a widget to modify it as your own and add a scroll bar widget.
This post also talks about the same issue.
3 .
Another solution would be the use a vertical slider which value goes from 0 to 4999. On value change of the slider, call the method animateToItem() with the value of the slider as parameter.
Hope this helps.
Don’t hesitate to give us a feedback, tell us if this solved your issue.