cancel
Showing results for 
Search instead for 
Did you mean: 

Some wrong actions in ScrollList Widget.

xchen.1480
Associate II

I'm using ScrollList in my TouchGFX project, but there are 2 problems:

1, After setWindowSize(n), when n is not 1, the itemSelected in

void scrollTopItemSelectedHandler(int16_t itemSelected) have a wrong value.

As described in the following 2 tips:

https://community.st.com/s/question/0D53W000003KJ4MSAW/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-

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

2, When setWindowSize(1), and scrollList.setSnapping(false), the itemSelected always right in each selection;

but if scrollList.setSnapping(true), the itemSelected will move left a half item.

0693W000001ce2lQAA.png

How to solve these two problems?

Is there some bug in ScrollList, or am I using it wrong?

14 REPLIES 14

I tried to delete the <project>\touchgfx\framework\source\touchgfx\containers\Scrollers folder, the simulator and VS and MDK are run well.

But deleted the <project>\touchgfx\lib\win\msvs, the VS gave a link error:

LINK : fatal error LNK1104: Can not open file “..\..\touchgfx\lib\win\msvs\libtouchgfx_v142_debug.lib�?

So it must used the library, can you send me the new library used in VS and MDK? Thank you.

And from your reply above, you can make the c++ source file join into the compiling? How to do it?​

PS: The TouchGFX version is V4.13.0

Hello,

Why are you deleting <project>\touchgfx\lib\win\msvs ? Just replacing the Scrollers/ folder by the one I gave should work. Plus you just said it works when you replace the folder with the modified one. I don't follow your intention, can you explain ?

/Alexandre

Hello,

After I replace the Scrollers  folder with the modified one, the bugs still exist.

So I guess that the VS and MDK projects did not use these new files in folder.

Then I tried to prove my guess:

1, I deleted the Scrollers  folder, the projects can still be compiled correctly.

2, I deleted the <project>\touchgfx\lib\win\msvs folder, the VS project gave a link error:

LINK : fatal error LNK1104: Can not open file “..\..\touchgfx\lib\win\msvs\libtouchgfx_v142_debug.lib�?

So I think the modified files did not take effect because they were not compiled into the object code.

To solve the problem, the library file must be updated, not the source files.

@Alexandre RENOUX​  Was this issue being resolved? I am having the same concern as the above @xchen.1480​, just changing the source files does not help resolving the main issue.

Hello,

The new release 4.14 with all the fixes will be out in 2 weeks normally. Then, you will have everything (the files and the updated lib).

If you cannot wait, another possibility is to take those files I gave and rename the class and files whatever fits you and use this class instead.

/Alexandre