2019-04-11 10:32 PM
I am creating my menu using ListLayout Example of TouchGFX example code.
I want to set the Limit of the Scrollbar. But when I reviewed the current example and Class, I could not find that part.
How can I set Limit ?????
The end of the current list is similar to the one below, but I want to make the end of the list like the second one.
1st.
2nd.
2019-05-03 08:50 AM
@ikassma do you resolve this problem?
2019-05-04 06:08 PM
no,i don't
2019-05-06 06:15 AM
same problem here :)
2019-05-06 06:16 AM
Its like the scrolling limit value is somehow set to the upper side of the container instead of the lower side
2019-05-07 04:00 AM
The height of the "list" member in the ListView example controls this behavior. Try, in your concrete view constructor, adding the following line:
list.setPosition(0, 0, 250, 50 /*Previously 250*/);
2019-05-07 04:49 AM
The list member of the object is in protected scope ... and cant be accessed form the view construcor ...
2019-05-07 05:14 AM
The concrete view uses public inheritance, so it should have access to the base class protected members. I have the example running here.
/Martin
2019-07-23 11:38 PM
Here is the answer for the question.
Simply use
setWindowSize()
From ScrollList Class.
If you have a list instance called myScrollList. And you want it to always display 5 items. You do this:
myScrollList.setWindowSize(5);
The default value is 1. So it will keep scrolling until there is 1 item displayed (Like the screenshot you shared). Set it to 5 and it won't scroll if less than 5 items are going to be visible.
2020-07-14 08:48 AM
setWindowSize() is a member in the ScrollList Class, not in the ListLayoutthough.
Is there a way to have the same effect of setWindowSize() in ListLayout?