Change the behaviour of ta widget's cursor

Hi

I’d like to change the beavior o af a ta widget cursor in my projet (switching it on or off) but i can’t change the beavior definied in the defauft theme (ta_cursor w/ LV_STATE_FOCUSED state). How can i override the beavior (switching it on or off acording to LV_STATE_USER1 for exemple).
I get what i want but i have to change the lv_theme_default.c file… and it’s not a good idea!!

Thanks!!!

You can do this:

    lv_obj_t * ta = lv_textarea_create(lv_scr_act());

    lv_obj_set_style_anim_time(ta, 0, LV_STATE_USER_1 | LV_PART_CURSOR);
    lv_obj_set_style_border_width(ta, 0, LV_STATE_USER_1 | LV_PART_CURSOR);

    lv_obj_set_style_anim_time(ta, 0, LV_STATE_USER_2 | LV_PART_CURSOR);
    lv_obj_set_style_border_width(ta, 2, LV_STATE_USER_2 | LV_PART_CURSOR);

    //No cursor
    lv_obj_add_state(ta, LV_STATE_FOCUSED | LV_STATE_USER_1);

    //Permanent cursor
    lv_obj_add_state(ta, LV_STATE_FOCUSED | LV_STATE_USER_2);

Note that anim_time = 0 means no blink animation.

Thank you !! i’ll try this code tomorow
Best Regards