当前位置:网站首页>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方式对齐
}
运行效果
边栏推荐
- LVGL 8.2 Simple Drop down list
- LVGL 8.2 Image
- pytorch 筆記 torch.nn.BatchNorm1d
- 05_Node js 文件管理模块 fs
- About Library (function library), dynamic library and static library
- The programmer was beaten.
- 最新SCI影响因子公布:国产期刊最高破46分!网友:算是把IF玩明白了
- Skill sorting [email protected]+ Alibaba cloud +nbiot+dht11+bh1750+ soil moisture sensor +oled
- 技能梳理[email protected]语音模块+stm32+nfc
- 安徽《合肥市装配式建筑施工图审查设计深度要求》印发;河北衡水市调整装配式建筑预售许可标准
猜你喜欢
[email protected] somatosensory manipulator"/>
Skill combing [email protected] somatosensory manipulator
智能DNA分子纳米机器人模型来了
File sharing server
mysql数据库基础:视图、变量
nvm、nrm、npx使用(安装、基本命令、参数、curl、wget)
Review of mathematical knowledge: curve integral of the second type
Test memory read rate
[email protected]在oled上控制一条狗的奔跑"/>
技能梳理[email protected]在oled上控制一条狗的奔跑
腾讯云数据库工程师能力认证重磅推出,各界共话人才培养难题
matplotlib 笔记: contourf & contour
随机推荐
Typescript – classes in Es5, inheritance, static methods
scratch绘制正方形 电子学会图形化编程scratch等级考试二级真题和答案解析2022年6月
ArcGIS Pro scripting tool (6) -- repairing CAD layer data sources
【Rust日报】2021-01-22 首份Rust月刊杂志邀请大家一起参与
LVGL 8.2 Simple Image button
技能梳理[email protected]体感机械臂
从0使用keil5软件仿真调试GD32F305
Musk has more than 100 million twitter fans, but he has been lost online for a week
Ionic4 drag the ion reorder group component to change the item order
数学知识复习:第二型曲线积分
Skill combing [email protected] intelligent instrument teaching aids based on 51 series single chip microcomputer
Skill sorting [email protected]+ Alibaba cloud +nbiot+dht11+bh1750+ soil moisture sensor +oled
Machine learning interview preparation (I) KNN
Leetcode question brushing (III) -- binary search (go Implementation)
潘多拉 IOT 开发板学习(HAL 库)—— 实验1 跑马灯(RGB)实验(学习笔记)
技能梳理[email protected]+adxl345+电机震动+串口输出
Leetcode question brushing (I) -- double pointer (go Implementation)
From introduction to mastery of MySQL 50 lectures (32) -scylladb production environment cluster building
Gd32 RT thread ota/bootloader driver function
Implementation of iterative method for linear equations