Lines Matching refs:btn
228 lv_obj_set_event_cb(btn, btn_event_cb); /*Assign a callback to the button*/
232 void btn_event_cb(lv_obj_t * btn, lv_event_t event)
247 lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL); /*Add a button the current screen*/
248 lv_obj_set_pos(btn, 10, 10); /*Set its position*/
249 lv_obj_set_size(btn, 100, 50); /*Set its size*/
250 lv_obj_set_event_cb(btn, btn_event_cb); /*Assign a callback to the button*/
252 lv_obj_t * label = lv_label_create(btn, NULL); /*Add a label to the button*/
257 void btn_event_cb(lv_obj_t * btn, lv_event_t event)
288 lv_btn_set_style(btn, LV_BTN_STYLE_REL, &style_btn_rel); /*Set the button's released style*/
289 lv_btn_set_style(btn, LV_BTN_STYLE_PR, &style_btn_pr); /*Set the button's pressed style*/
343 lv_obj_t * btn = lv_list_add_btn(list, LV_SYMBOL_FILE, txts[i]);
344 lv_obj_set_event_cb(btn, list_event); /*Assign event function*/
345 lv_btn_set_toggle(btn, true); /*Enable on/off states*/
360 lv_obj_t * btn = lv_list_add_btn(list, LV_SYMBOL_FILE, txts[i]);
361 lv_obj_set_event_cb(btn, list_event);
362 lv_btn_set_toggle(btn, true);
367 static void list_event(lv_obj_t * btn, lv_event_t e)
370 printf("%s\n", lv_list_get_btn_text(btn));
382 btn = lv.btn(scr)
383 btn.align(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
384 label = lv.label(btn)