• 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

LVGL Styles: doubt about lv_obj_remove_style_all()

Q&A Forum › Category: ESP32 › LVGL Styles: doubt about lv_obj_remove_style_all()
0 Vote Up Vote Down
Ivan Tarozzi asked 10 months ago

I’m following the LVLG book and related examples and I have a question about lv_obj_remove_style_all() function.
In chapter 2.4 you say to call lv_obj_remove_style_all to remove default styles, before apply the custom one to the button.
But in chapter 2.5 the same is not required before assign custom styles to the Slider.
Commenting out the new style I can see the slider with default style, so it exists.
So, why and when removing default style is actually required?
Thanks so much

Question Tags: LVGL, styles
1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 10 months ago

Hi.
Thanks for pointing that out.
We were mistaken… that function removes previously applied styles.
So, you must use it to remove any styles that you might have added previously. So, you don’t need it if applying your own styles for the first time in that program.
 
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.