当前位置:网站首页>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

边栏推荐
- Go zero micro Service Practice Series (VIII. How to handle tens of thousands of order requests per second)
- Android 开发面试真题进阶版(附答案解析)
- LVGL 8.2 Checkboxes as radio buttons
- Migrate full RT thread to gd32f4xx (detailed)
- SGD有多种改进的形式,为什么大多数论文中仍然用SGD?
- Qt之实现QQ天气预报窗体翻转效果
- Typescript – classes in Es5, inheritance, static methods
- LeetCode Algorithm 86. 分隔链表
- Every time I look at my colleagues' interface documents, I get confused and have a lot of problems...
- sCrypt 中的 ECDSA 签名验证
猜你喜欢

CP2112使用USB转IIC通信教学示例

再测云原生数据库性能:PolarDB依旧最强,TDSQL-C、GaussDB变化不大

Pytorch notes torch nn. BatchNorm1d

Review of mathematical knowledge: curve integral of the second type

吴恩达2022机器学习专项课测评来了!

中国将强制统一充电接口,苹果如不低头,iPhone将被踢出中国市场

pytorch 筆記 torch.nn.BatchNorm1d

电商两位大佬花边新闻刷屏,代表电商回归正常,将有利于实体经济

同事的接口文档我每次看着就头大,毛病多多。。。

sCrypt 中的 ECDSA 签名验证
随机推荐
透過華為軍團看科技之變(五):智慧園區
Mysql database foundation: TCL transaction control language
前嗅ForeSpider教程:抽取数据
LVGL 8.2 Image styling and offset
Didi open source agile test case management platform!
蚂蚁金服笔试题:需求文档有什么可以量化的【杭州多测师】【杭州多测师_王sir】...
DQN笔记
断路器HystrixCircuitBreaker
同事的接口文档我每次看着就头大,毛病多多。。。
苹果高管公然“开怼”:三星抄袭 iPhone,只加了个大屏
& and - > priority
ionic4 ion-reorder-group组件拖拽改变item顺序
微信推出图片大爆炸功能;苹果自研 5G 芯片或已失败;微软解决导致 Edge 停止响应的 bug|极客头条...
05_ Node JS file management module FS
历史上的今天:微软收购 PowerPoint 开发商;SGI 和 MIPS 合并
The latest SCI impact factor release: the highest score of domestic journals is 46! Netizen: I understand if
Ionic4 drag the ion reorder group component to change the item order
【STL源码剖析】迭代器
sCrypt 中的 ECDSA 签名验证
智能DNA分子纳米机器人模型来了