cancel
Showing results for 
Search instead for 
Did you mean: 

How to keep the last item of a scroll list keep at the bottom of list? (Not solved yet. When using setWindowSize, there are some error.. Please help me!! ) ==>Solved.

JPark.14
Associate III

Dear TouchGFX team,

After I made 6 items for a scroll list, I made them to show 3 items on a sreen.

When I dragged to the top, the 1st, 2nd and 3rd item showed as I expected. And when I dragged to the bottom, I expected the last 3 items ( 4th, 5th and 6th) show on a screen. But just the last item (the 6th) showed in the screen.

I want to show the last 3 items in that situation.

Is there any option or function to implement it? Or let me know if any other widget to make it.

Sorry for my lack of explanation for it. I hope the attached image can be explained more easily.

Thanks in advance!!

J.Park

1 ACCEPTED SOLUTION

Accepted Solutions
JPark.14
Associate III

No response for a long time but I'm very happy this problem is clearly solved in TouchGFX 4.14.

Thank you, TouchGFX team!!

J.Park

View solution in original post

5 REPLIES 5
PBull
Associate III

Hi,

something like this should work:

scrollList.setNumberOfItems(6); 
scrollList.setWindowSize(3);

Greetings,

Peter

Thanks for the quick and very correct answer. Perfectly works!

There are many things to know as a TouchGFX beginner..

Thanks again, Peter. ^^*

JPark.14
Associate III

I got another problem !!

I added "scrollList.setWindowsSize(3);" in my setup code.

As I said, the display worked perfectly. But I found it has a wrong itemSelected value in the function of void scrollListItemSelectedHandler(int16_t itemSelected).

(1) setWindowsSize(1) : I got a right itemSelected value when I select a item in the list. No problem.

(2) setWindowsSize(3) : #0~#3 is OK. but when I click the #5 item, I got #4. Not #5. <== Wrong value

What I have to do to get a right itemSelected value when I set more than 1 as a parameter of "setWindowSize" function.

Thanks in advance!!

J.Park

And I found other post about this problem. But unfortunately no answer..

https://community.st.com/s/question/0D50X0000B7ZL90SQG/problem-with-itemselectedcallback-scroll-list

What I have to do to solve this problem?

Thanks in advance!!

J.Park

JPark.14
Associate III

No response for a long time but I'm very happy this problem is clearly solved in TouchGFX 4.14.

Thank you, TouchGFX team!!

J.Park