当前位置:网站首页>LVGL 8.2 Drop down in four directions
LVGL 8.2 Drop down in four directions
2022-06-30 10:08:00 【仙剑情缘】
创建4个方向drop down list
/** * Create a drop down, up, left and right menus */
static void lv_example_dropdown_2(void)
{
static const char* opts = "Apple\n"
"Banana\n"
"Orange\n"
"Melon"; //drop down选项文本内容
lv_obj_t* dd;
dd = lv_dropdown_create(lv_scr_act()); //创建drop down 对象
lv_dropdown_set_options_static(dd, opts); //设置选项列表内容
lv_obj_align(dd, LV_ALIGN_TOP_MID, 0, 10); //LV_ALIGN_TOP_MID方式对齐
dd = lv_dropdown_create(lv_scr_act()); //创建drop down 对象
lv_dropdown_set_options_static(dd, opts);//设置选项列表内容
lv_dropdown_set_dir(dd, LV_DIR_BOTTOM); //设置下拉列表方向为BOTTOM
lv_dropdown_set_symbol(dd, LV_SYMBOL_UP); // 设置drop down箭头符号为系统自带的LV_SYMBOL_UP
lv_obj_align(dd, LV_ALIGN_BOTTOM_MID, 0, -10);//LV_ALIGN_BOTTOM_MID方式对齐
dd = lv_dropdown_create(lv_scr_act()); //创建drop down 对象
lv_dropdown_set_options_static(dd, opts); //设置选项列表内容
lv_dropdown_set_dir(dd, LV_DIR_RIGHT); //设置下拉列表方向为LV_DIR_RIGHT
lv_dropdown_set_symbol(dd, LV_SYMBOL_RIGHT); // 设置drop down箭头符号为系统自带的LV_SYMBOL_RIGHT
lv_obj_align(dd, LV_ALIGN_LEFT_MID, 10, 0);//LV_ALIGN_LEFT_MID方式对齐
dd = lv_dropdown_create(lv_scr_act()); //创建drop down 对象
lv_dropdown_set_options_static(dd, opts);//设置选项列表内容
lv_dropdown_set_dir(dd, LV_DIR_LEFT); //设置下拉列表方向为LV_DIR_LEFT
lv_dropdown_set_symbol(dd, LV_SYMBOL_LEFT); // 设置drop down箭头符号为系统自带的LV_SYMBOL_LEFT
lv_obj_align(dd, LV_ALIGN_RIGHT_MID, -10, 0);//LV_ALIGN_RIGHT_MID方式对齐
}
运行效果
边栏推荐
- About Library (function library), dynamic library and static library
- CSDN博客运营团队2022年H1总结
- js常见问题
- ionic4 ion-reorder-group组件拖拽改变item顺序
- LVGL 8.2 Image styling and offset
- Leetcode question brushing (I) -- double pointer (go Implementation)
- Collectors.toMap应用
- go-zero微服务实战系列(八、如何处理每秒上万次的下单请求)
- 六月集训(第30天) —— 拓扑排序
- Skill combing [email protected] intelligent instrument teaching aids based on 51 series single chip microcomputer
猜你喜欢

sCrypt 中的 ECDSA 签名验证

Auto SEG loss: automatic loss function design

scratch绘制正方形 电子学会图形化编程scratch等级考试二级真题和答案解析2022年6月

DQN笔记

Voir le changement technologique à travers la Légion Huawei (5): Smart Park
[email protected] intelligent instrument teaching aids based on 51 series single chip microcomputer"/>Skill combing [email protected] intelligent instrument teaching aids based on 51 series single chip microcomputer
[email protected] control a dog's running on OLED"/>Skill combing [email protected] control a dog's running on OLED

mysql数据库基础:视图、变量

Use keil5 software to simulate and debug gd32f305 from 0

Review of mathematical knowledge: curve integral of the second type
随机推荐
matplotlib 笔记: contourf & contour
Use keil5 software to simulate and debug gd32f305 from 0
【Rust每周一库】num-bigint - 大整数
Qt之实现动效导航栏
Gd32 RT thread RTC driver function
Gd32 RT thread ota/bootloader driver function
Auto SEG loss: automatic loss function design
Auto Seg-Loss: 自动损失函数设计
Circuit breaker hystrixcircuitbreaker
LVGL 8.2 Image styling and offset
Foresniffer tutorial: extracting data
Voir le changement technologique à travers la Légion Huawei (5): Smart Park
Go -- standard library sort package
安徽《合肥市装配式建筑施工图审查设计深度要求》印发;河北衡水市调整装配式建筑预售许可标准
js常见问题
About Library (function library), dynamic library and static library
Gd32 RT thread PWM drive function
苹果高管公然“开怼”:三星抄袭 iPhone,只加了个大屏
【深度学习】深度学习检测小目标常用方法
技能梳理[email protected]基于51系列单片机的智能仪器教具