Navigation problems with Tabview and encoder input

First of all I just discovered this library a few days ago and I have to say it is awesome! It took me only a few hours to port it to my device using the samples provided. Creating and styling the UI is very easy and well documented.


What MCU/Processor/Board and compiler are you using?

ESP32 (M5Stack) using the epsressif-idf v3.3
The problems are reproducible with the simulator under Windows (Visual Studio 2019)

What do you experience?

I have a Tabview as a “master” to organize my UI. My device only has three buttons which I implemented as a “LV_INDEV_TYPE_ENCODER” type driver. I have found two problems when I use the encoder as input:

  1. When deselecting an element inside a tab and re-selecting the tabview, always the first tab is preselected. When I press the mouse wheel to activate that tab it does not work. I have to first select another tab (e.g. scroll to tab two) and then scroll back to tab one, now the activation by pressing the mouse wheel works.
  2. Buttons are always select-able and press-able when they are in the same group as the Tabview even when the button are not inside the currently visible tab.

What do you expect?

For problem 1:
When selecting the Tabview then always the currently active tab should be preselected.

For problem 2:
Only visible buttons should be select-able and press-able. This can probably be fixed in the application software by adding/removing elements dynamically when the LV_EVENT_VALUE_CHANGED event is triggered. To be honest I have not tried this yet and I don’t know if this a bug or not.

Code to reproduce

I am not allowed to attach any files so I posted the main.c here:
Just replace the main.c form the simulator with this file.
I have only tried the visual studio based simulator but since I have the same problem on the real device I figure it is probably reproducible in other systems too.

Screenshot and/or video

If possible, add screenshots and/or videos about the current issue.

If you use the forum a bit (respond to other posts, read other posts) that restriction automatically gets lifted.

If I recall the source code correctly, I think that pointer-based devices (mice or touchscreens) cannot click invisible buttons, but other types of devices can. Did you try lv_obj_set_click(obj, false) (which disables clicking the object)?

It sounds reasonable. I’ve just pushed an update to in dev-6.1.

Yes, it should be solved in the application level.

Using dev-6.1 fixes the the problem. Thanks a lot!

1 Like