• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

disable scrolling with tabs

Q&A Forum › Category: ESP32 › disable scrolling with tabs
0 Vote Up Vote Down
Olivier Quirion asked 7 months ago

Hi i there a way to disable scrolling when using tabs, ive tried
lv_obj_clear_flag(tabview), LV_OBJ_FLAG_SCROLLABLE);
or
lv_obj_clear_flag(tabview), LV_OBJ_FLAG_SCROLL_CHAIN_HOR);
but that didnt work

Question Tags: scroll tabview tab
7 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

Hi.
Can you tell me which project exactly are you trying to modify?
Regards,
Sara

0 Vote Up Vote Down
Olivier Quirion answered 7 months ago

example from module 7_3 with tabs
 

0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

Hi.

Try adding the following lines

lv_obj_t *tabview_content = lv_tabview_get_content(tabview);
lv_obj_clear_flag(tabview_content, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(tabview_content, LV_OBJ_FLAG_SCROLL_CHAIN_HOR);

After creating the tab view:

// Create a Tab view object
lv_obj_t * tabview;
tabview = lv_tabview_create(lv_screen_active());
lv_tabview_set_tab_bar_size(tabview, 40);

Let me know if this works.

Regards,
Sara

0 Vote Up Vote Down
Olivier Quirion answered 7 months ago

it works partially, cannot drag between tabs but can drag inside a tab, objects does recenter automatically but very slowly and lagging

0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

Hi.
I tested it on my side, and it is working correctly…
Did you change anything else on the code? Can you send me a quick video showing the issue?
To share a video, upload it to google drive and then, share a link to the file.
Regards,
Sara

0 Vote Up Vote Down
Olivier Quirion answered 7 months ago

i have added a keypad on the last tab and i can drag it https://drive.google.com/file/d/1HZKDJFrPnJ1tHxUsuZTaGRf_KHQ4wSY-/view?usp=sharing

0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

Hi.
In that case, I think you need to clear the flag of the individual tabs you want to remove scrolling. For example:
If you want to apply to the following tab

lv_obj_t * tab1 = lv_tabview_add_tab(tabview, "Outputs");

Add this after

lv_obj_clear_flag(tab1, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(tab1, LV_OBJ_FLAG_SCROLL_CHAIN_HOR);

Let me know if this works.

Regards,
Sara

 

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.