2021-01-20
原创
©著作权归作者所有:来自51CTO博客作者JDSH0224的原创作品,请联系作者获取转载授权,否则将追究法律责任
源代码
//18. 消息弹窗控件
static const char * btns[] = { "Apply", "Close", "" };
mbox1 = lv_mbox_create(lv_scr_act(), NULL);
lv_mbox_set_text(mbox1, "A message box with two buttons.");
lv_mbox_add_btns(mbox1, btns);
lv_obj_set_width(mbox1, 160);
lv_obj_set_event_cb(mbox1, mbox_event_handler);
lv_obj_align(mbox1, NULL, LV_ALIGN_CENTER, -180, 120); /*Align to the corner*/
效果显示