当前位置:网站首页>LVGL 8.2 Simple Colorwheel
LVGL 8.2 Simple Colorwheel
2022-06-30 10:54:00 【Fairy sword love】
establish Colorwheel
static void lv_example_colorwheel_1(void)
{
lv_obj_t* cw;
cw = lv_colorwheel_create(lv_scr_act(), true); // establish colorwheel object
lv_obj_set_size(cw, 200, 200); // Set size
lv_obj_center(cw); // centered
}
Running effect

Add color change callback processing
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); // establish colorwheel object
lv_obj_set_size(cw, 200, 200); // Set size
lv_obj_center(cw); // centered
lv_obj_add_event_cb(cw, event_handler, LV_EVENT_VALUE_CHANGED, NULL);
}
Running effect

边栏推荐
- MySQL从入门到精通50讲(三十二)-ScyllaDB生产环境集群搭建
- 小程序中读取腾讯文档的表格数据
- Viewing technological changes through Huawei Corps (V): smart Park
- ArrayList and sequence table
- matplotlib 笔记: contourf & contour
- The two e-commerce bigwigs' lacy news screens represent the return of e-commerce to normal, which will be beneficial to the real economy
- Gd32 RT thread ota/bootloader driver function
- [机缘参悟-34]:光锥之内皆命运
- Collectors. Tomap application
- scratch绘制正方形 电子学会图形化编程scratch等级考试二级真题和答案解析2022年6月
猜你喜欢

The programmer was beaten.

The performance of arm's new CPU has been improved by 22%, up to 12 cores can be combined, and the GPU is first equipped with hardware optical tracking. Netizen: the gap with apple is growing
[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

数学知识复习:第二型曲线积分

微信推出图片大爆炸功能;苹果自研 5G 芯片或已失败;微软解决导致 Edge 停止响应的 bug|极客头条...

深潜Kotlin协程(十六):Channel

DQN笔记

Deep dive kotlin synergy (16): Channel

List introduction

China will force a unified charging interface. If Apple does not bow its head, iPhone will be kicked out of the Chinese market
随机推荐
Deep dive kotlin Xie Cheng (17): Actor
My in-depth remote office experience | community essay solicitation
Pycharm项目使用pyinstalle打包过程中问题及解决方案
go-zero微服务实战系列(八、如何处理每秒上万次的下单请求)
& and - > priority
The programmer was beaten.
Dell et Apple, deux entreprises de PC établies, se sont effondrées rapidement
SGD has many improved forms. Why do most papers still use SGD?
Ionic4 drag the ion reorder group component to change the item order
[rust daily] several new libraries were released on January 23, 2021
Auto SEG loss: automatic loss function design
Qt之实现QQ天气预报窗体翻转效果
List introduction
7 大轻量易用的工具,给开发者减压提效,助力企业敏捷上云 | Techo Day 精彩回顾...
How can the sports app keep the end-to-side background alive to make the sports record more complete?
Turn to cartoon learning notes
Auto Seg-Loss: 自动损失函数设计
Mysql database foundation: views and variables
煥發青春的戴爾和蘋果夾擊,兩大老牌PC企業極速衰敗
Memory escape analysis