当前位置:网站首页>LVGL 8.2 Simple Colorwheel
LVGL 8.2 Simple Colorwheel
2022-06-30 10:08:00 【仙剑情缘】
创建Colorwheel
static void lv_example_colorwheel_1(void)
{
lv_obj_t* cw;
cw = lv_colorwheel_create(lv_scr_act(), true); //创建colorwheel对象
lv_obj_set_size(cw, 200, 200); //设置大小
lv_obj_center(cw); //居中显示
}
运行效果

增加颜色改变回调处理
static void event_handler(lv_event_t* e)
{
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t* obj = lv_event_get_target(e);
if (code == LV_EVENT_VALUE_CHANGED)
{
lv_color_t color = lv_colorwheel_get_rgb(obj);
LV_LOG_USER("Selected color is %x", color.full);
}
}
static void lv_example_colorwheel_1(void)
{
lv_obj_t* cw;
cw = lv_colorwheel_create(lv_scr_act(), true); //创建colorwheel对象
lv_obj_set_size(cw, 200, 200); //设置大小
lv_obj_center(cw); //居中显示
lv_obj_add_event_cb(cw, event_handler, LV_EVENT_VALUE_CHANGED, NULL);
}
运行效果

边栏推荐
猜你喜欢

DQN笔记

Overview of currency

ArcGIS Pro scripting tool (6) -- repairing CAD layer data sources

Q-Learning笔记

Getting started with X86 - take over bare metal control

Migrate full RT thread to gd32f4xx (detailed)

小程序中读取腾讯文档的表格数据

Mysql database foundation: views and variables

Auto SEG loss: automatic loss function design

LVGL 8.2 Image
随机推荐
Skill sorting [email protected]+adxl345+ Motor vibration + serial port output
sCrypt 中的 ECDSA 签名验证
Sarsa笔记
CSDN blog operation team 2022 H1 summary
pytorch 笔记 torch.nn.BatchNorm1d
Skill combing [email protected] voice module +stm32+nfc
今晚19:00知识赋能第2期直播丨OpenHarmony智能家居项目之控制面板界面设计
苹果高管公然“开怼”:三星抄袭 iPhone,只加了个大屏
我在鹅厂淘到了一波“炼丹神器”,开发者快打包
Go -- standard library sort package
TypeScript–es5中的类,继承,静态方法
Smith chart view of semi steel coaxial RF line and RF line matching calibration of network analyzer e5071c
从0使用keil5软件仿真调试GD32F305
WGet -- 404 not found due to spaces in URL
LVGL 8.2 Simple Drop down list
LVGL 8.2 Image
【Rust日报】2021-01-23 几个新库发布
From introduction to mastery of MySQL 50 lectures (32) -scylladb production environment cluster building
运动App如何实现端侧后台保活,让运动记录更完整?
IPhone address book import into Excel