Description
Use encoder/tab /mousewheel to navigate in objects. The object which is selected has a very tiny border.I want to know.
1.How to change its width and color
2.In which state the indicated object is
What MCU/Processor/Board and compiler are you using?
visual stdio 2019
What LVGL version are you using?
v8.2.0
What do you want to achieve?
1.change selected border’s width and color
2.In which state the indicated object is
What have you tried so far?
I have tried to change the border and outline .But it has no effects.
Code to reproduce
void forum2()
{
lv_obj_t* btn_hand_p, * btn_hand_n, * label;
btn_hand_p = lv_btn_create(lv_scr_act());
lv_coord_t sw = 20;
lv_obj_set_style_border_color(btn_hand_p, lv_color_black(), LV_PART_ANY);
lv_obj_set_style_outline_color(btn_hand_p, lv_color_black(), LV_PART_ANY);
lv_obj_set_style_outline_width(btn_hand_p, sw, LV_PART_ANY);
lv_obj_align(btn_hand_p, LV_ALIGN_TOP_LEFT, 20, 20);
lv_obj_add_flag(btn_hand_p, LV_OBJ_FLAG_CHECKABLE);
label = lv_label_create(btn_hand_p);
lv_label_set_text(label, "Hand+");
lv_obj_center(label);
btn_hand_n = lv_btn_create(lv_scr_act());
lv_obj_align_to(btn_hand_n, btn_hand_p, LV_ALIGN_OUT_BOTTOM_MID, -20, 20);
lv_obj_add_flag(btn_hand_n, LV_OBJ_FLAG_CHECKABLE);
label = lv_label_create(btn_hand_n);
lv_label_set_text(label, "Hand-");
lv_obj_center(label);
}