How to have Page work with Tileview?

I’m building an app using the Tileview widgets with 2 tiles side by side.

        pos = [
            {'x': 0, 'y': 0},  # main screen
            {'x': 1, 'y': 0},  # right screen

On the right screen, I have an empty Page widget on which I want to achieve the similar effect of List, but with containers, not buttons. The Page starts with no container in it, but later the container will be populated one by one by the program, being new ones stack on top of old ones.

Now the issue is, I can switch to the right screen from the main screen with no problem, but I cannot switch back, unless I drag by that thin scrollbar of the tileview on the bottom of the screen.

The red arrows indicate the direction the screen is slided.

I have added the right screen tile, the page, the containers and the labels on top of the containers to the tileview with tileview.add_element(), also set the page scroll propagation to True, didn’t work out. What else did I miss?

At the moment I added a transparent container on top of the page, which made the tileview work (see the left picture above), but this way I cannot sroll the page up and down when the containers exceed the height of the page.

Another question: how can I set the padding of the page to zero? The page is set to the same size as the display (W:320, H480), but when I add a container with width=320, I can always see the horizontal scollbar of the page, and there are some paddings around the container (as indicated by the green arrows in the above picture). I tried page.set_scrollable_fit(lv.FIT.TIGHT), but as soon as I added new container to the empty page, the program crashed and the esp32 rebooted (see below the crash error).

***ERROR*** A stack overflow in task mp_task has been detected.
abort() was called at PC 0x40098b70 on core 0

ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000

Backtrace: 0x40098807:0x3ffc8050 0x40098b59:0x3ffc8070 0x40098b70:0x3ffc8090 0x40094856:0x3ffc80b0 0x400967f8:0x3ffc80d0 0x400967ae:0x00000000


Thanks for the help.

I think this question is not Micropython specific, right? Same questions apply to C.

I suggest moving this question to “How To” category where more people would see it and you would have a higher chance getting responses.

Another suggestion, if possible - it could help if you add images/screenshots of what you have vs. what you expect.

Regarding the crash, I suggest running this on the unix port where it’s easier to connect a debugger.

Thanks for the suggestions. I have moved the topic to How-to, and added a few pictures and more details.

@kisvegabor Any ideas?

The tileview and scrolling in general is not so intuitive in v7. In v8 it became much simpler so I’d suggest shifting to v8 (see a tileview example) but v8 is not tried with Micropython.

v8 is getting stable and actually, we can try how it works with Micropython. @amirgon will you have time to make some experiments.

@kisvegabor We need to review as it will probably change the syntax in MicroPython.

True, I’ve read the points again and there are some questionable points. I’ll comment there at latest tomorrow.

I will try to find some time for this next week, or the week after.
Let’s continue the discussion on #1763.