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

边栏推荐
- LVGL 8.2 Drop down in four directions
- 第一届中国数字藏品大会即将召开
- Robotframework learning notes: environment installation and robotframework browser plug-in installation
- 7 大轻量易用的工具,给开发者减压提效,助力企业敏捷上云 | Techo Day 精彩回顾...
- MySQL导出sql脚本文件
- Use keil5 software to simulate and debug gd32f305 from 0
- When does the database need to use the index [Hangzhou multi surveyors] [Hangzhou multi surveyors _ Wang Sir]
- Mysql database foundation: constraint and identification columns
- Didi open source agile test case management platform!
- Memory escape analysis
猜你喜欢

煥發青春的戴爾和蘋果夾擊,兩大老牌PC企業極速衰敗

nvm、nrm、npx使用(安装、基本命令、参数、curl、wget)

第一届中国数字藏品大会即将召开

Apple's 5g chip was revealed to have failed in research and development, and the QQ password bug caused heated discussion. Wei Lai responded to the short selling rumors. Today, more big news is here

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

Matplotlib notes: contour & Contour

【STL源码剖析】迭代器

Voir le changement technologique à travers la Légion Huawei (5): Smart Park

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

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
随机推荐
深潜Kotlin协程(十六):Channel
LVGL 8.2 Simple Drop down list
Classic interview question: responsible modules, how do you design test cases for these function points? [Hangzhou multi surveyors] [Hangzhou multi surveyors \wang Sir]
20万奖金池!【阿里安全 × ICDM 2022】大规模电商图上的风险商品检测赛火热报名中!...
ArcGIS Pro scripting tool (5) - delete duplicates after sorting
LVGL8.2 Simple Checkboxes
[STL source code analysis] container (to be supplemented)
js常见问题
Robotframework learning notes: environment installation and robotframework browser plug-in installation
About Library (function library), dynamic library and static library
Dell et Apple, deux entreprises de PC établies, se sont effondrées rapidement
【STL源码剖析】容器(待补充)
ArrayList and sequence table
& and - > priority
JS FAQs
Input a decimal data, convert to 8, using the sequence stack
The programmer was beaten.
Smith chart view of semi steel coaxial RF line and RF line matching calibration of network analyzer e5071c
ionic4 ion-reorder-group组件拖拽改变item顺序
Qt之实现QQ天气预报窗体翻转效果