minor fixes
This commit is contained in:
@@ -8,7 +8,7 @@ static void event_handler(lv_event_t * e)
|
||||
if(code == LV_EVENT_VALUE_CHANGED) {
|
||||
const char * txt = lv_checkbox_get_text(obj);
|
||||
const char * state = lv_obj_get_state(obj) & LV_STATE_CHECKED ? "Checked" : "Unchecked";
|
||||
LV_LOG_USER("%s: %s\n", txt, state);
|
||||
LV_LOG_USER("%s: %s", txt, state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ void lv_example_checkbox_1(void)
|
||||
|
||||
cb = lv_checkbox_create(lv_scr_act());
|
||||
lv_obj_add_state(cb, LV_STATE_CHECKED | LV_STATE_DISABLED);
|
||||
lv_checkbox_set_text(cb, "Melon");
|
||||
lv_checkbox_set_text(cb, "Melon\nand a new line");
|
||||
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
|
||||
|
||||
lv_obj_update_layout(cb);
|
||||
|
||||
Reference in New Issue
Block a user