How to started start tab in tabview

Important: unclear posts may not receive useful answers.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Be sure you have checked the FAQ and read the relevant part of the documentation.
  • If applicable use the Simulator to eliminate hardware related issues.

Delete this section if you read and applied the mentioned points.


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

What LVGL version are you using?

What do you want to achieve?

Hi guys!
I added 7 tabs in tabview.
When initializing tabview, I want to use a specific tab as the start tab. How should I do it?
tab1 tab2 tab3 tab4 tab5 tab6 tab7
I want to start like this.

What have you tried so far?

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

/*You code here*/

Screenshot and/or video

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

Use this function.

void lv_tabview_set_act(lv_obj_t * obj, uint32_t id, lv_anim_enable_t anim_en);

Thanks for the reply

lv_tabview_set_act(tv, 2, LV_ANIM_ON);
When this function is used, it appears as shown in the figure below.
What should I do if I want to start with tab3 at all?


Do you mean hiding “tab1” and “tab2”?

The grayish color on “tab1” is used for “focus” indication?