当前位置:网站首页>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方式对齐
}
运行效果
边栏推荐
- Didi open source agile test case management platform!
- Input a decimal data, convert to 8, using the sequence stack
- RobotFramework学习笔记:环境安装以及robotframework-browser插件的安装
- Es common curl finishing
- 技能梳理[email protected]體感機械臂
- DQN笔记
- 【Rust日报】2021-01-23 几个新库发布
- 我的远程办公深度体验 | 社区征文
- How to deploy deflationary combustion destruction contract code in BSC chain_ Deploy dividend and marketing wallet contract code
- LVGL 8.2 Simple Drop down list
猜你喜欢

透过华为军团看科技之变(五):智慧园区

Review of mathematical knowledge: curve integral of the second type

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

Test memory read rate

Implementation of monitor program with assembly language
[email protected]+ Alibaba cloud +nbiot+dht11+bh1750+ soil moisture sensor +oled"/>Skill sorting [email protected]+ Alibaba cloud +nbiot+dht11+bh1750+ soil moisture sensor +oled

mysql数据库基础:约束、标识列

7 大轻量易用的工具,给开发者减压提效,助力企业敏捷上云 | Techo Day 精彩回顾...

LVGL 8.2 Image

Qt之实现动效导航栏
随机推荐
无心剑中译狄金森《灵魂择其伴侣》
R语言aov函数进行重复测量方差分析(Repeated measures ANOVA、其中一个组内因素和一个组间因素)、分别使用interaction.plot函数和boxplot对交互作用进行可视化
再测云原生数据库性能:PolarDB依旧最强,TDSQL-C、GaussDB变化不大
转卡通学习笔记
Notes on numerical calculation - iterative solution of linear equations
苹果5G芯片被曝研发失败,QQ密码bug引热议,蔚来回应做空传闻,今日更多大新闻在此...
SGD has many improved forms. Why do most papers still use SGD?
CVPR 2022 | 清华&字节&京东提出BrT:用于视觉和点云3D目标检测的桥接Transformer
"Hackers and painters" -- why not be stupid
断路器HystrixCircuitBreaker
I found a wave of "alchemy artifact" in the goose factory. The developer should pack it quickly
ArcGIS PRO + PS vectorized land use planning map
Arm新CPU性能提升22%,最高可组合12核,GPU首配硬件光追,网友:跟苹果的差距越来越大了...
Skill combing [email protected] somatosensory manipulator
R language plot visualization: use plot to visualize the prediction confidence of the multi classification model, the prediction confidence of each data point of the model in the 2D grid, and the conf
Go -- maximum heap and minimum heap
Skill sorting [email protected]+adxl345+ Motor vibration + serial port output
LVGL 8.2 Image
Leetcode question brushing (IV) -- greedy thought (go Implementation)
如何解决跨域