当前位置:网站首页>LVGL 8.2 Line wrap, recoloring and scrolling
LVGL 8.2 Line wrap, recoloring and scrolling
2022-07-04 14:35:00 【Fairy sword love】
Line wrap, recoloring and scrolling Example
static void lv_example_label_1(void)
{
lv_obj_t* label1 = lv_label_create(lv_scr_act()); // establish Label object
lv_label_set_long_mode(label1, LV_LABEL_LONG_WRAP); //LV_LABEL_LONG_WRAP Pattern
lv_label_set_recolor(label1, true); // Enable recolor
lv_label_set_text(label1, "#0000ff Re-color# #ff00ff words# #ff0000 of a# label,align the lines to the center "
"and wrap long text automatically."); //Re-color Recolor to blue ,words Colored purple ,of a Colored red , Others are the default color of the control
lv_obj_set_width(label1, 150); // Set up label Width
lv_obj_set_style_text_align(label1, LV_TEXT_ALIGN_CENTER, 0); // add to style characteristic LV_TEXT_ALIGN_CENTER To label object
lv_obj_align(label1, LV_ALIGN_CENTER, 0, -40); // LV_ALIGN_CENTER Alignment
lv_obj_t* label2 = lv_label_create(lv_scr_act()); // establish Label object
lv_label_set_long_mode(label2, LV_LABEL_LONG_SCROLL_CIRCULAR); //LV_LABEL_LONG_SCROLL_CIRCULAR Cycle scroll mode
lv_obj_set_width(label2, 150);// Set up label Width
lv_label_set_text(label2, "It is a circularly scrolling text. "); // Set up Label According to the content
lv_obj_align(label2, LV_ALIGN_CENTER, 0, 40);//LV_ALIGN_CENTER Alignment
}
Running effect

- Modify scroll Label Width to 320
lv_obj_set_width(label2, 320);
- Running effect

边栏推荐
- Docker compose public network deployment redis sentinel mode
- The implementation of OSD on rk1126 platform supports color translucency and multi-channel support for Chinese
- Solutions to the problems of miui12.5 red rice k20pro using Au or povo2
- The failure rate is as high as 80%. What are the challenges on the way of enterprise digital transformation?
- Test evaluation of software testing
- R language uses the DOTPLOT function of epidisplay package to visualize the frequency of data points in different intervals in the form of point graph, and uses the by parameter to specify the groupin
- No servers available for service: xxxx
- Leetcode T48:旋转图像
- Detailed analysis of pytorch's automatic derivation mechanism, pytorch's core magic
- remount of the / superblock failed: Permission denied
猜你喜欢

C # WPF realizes the real-time screen capture function of screen capture box

【信息检索】分类和聚类的实验

Test process arrangement (2)

Excel quickly merges multiple rows of data

No servers available for service: xxxx

潘多拉 IOT 开发板学习(RT-Thread)—— 实验3 按键实验(学习笔记)

Talk about 10 tips to ensure thread safety

Ultrasonic distance meter based on 51 single chip microcomputer

Test evaluation of software testing

Leetcode 61: rotating linked list
随机推荐
Leetcode T49: 字母异位词分组
Digi重启XBee-Pro S2C生产,有些差别需要注意
实时数据仓库
Map of mL: Based on Boston house price regression prediction data set, an interpretable case is realized by using the map value to the LIR linear regression model
Detailed explanation of visual studio debugging methods
leetcode:6110. 网格图中递增路径的数目【dfs + cache】
AI and Life Sciences
NowCoder 反转链表
2022 game going to sea practical release strategy
Explain of SQL optimization
开发中常见问题总结
Popular framework: the use of glide
Compile oglpg-9th-edition source code with clion
潘多拉 IOT 开发板学习(RT-Thread)—— 实验3 按键实验(学习笔记)
The game goes to sea and operates globally
Chapter 17 process memory
MySQL stored procedure exercise
使用CLion编译OGLPG-9th-Edition源码
一种架构来完成所有任务—Transformer架构正在以一己之力统一AI江湖
(1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!