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

边栏推荐
- LiveData
- (1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
- 数据埋点的一些问题和想法
- 一种架构来完成所有任务—Transformer架构正在以一己之力统一AI江湖
- Respect others' behavior
- 【信息检索】分类和聚类的实验
- [information retrieval] link analysis
- Count the running time of PHP program and set the maximum running time of PHP
- MySQL stored procedure exercise
- LVGL 8.2 List
猜你喜欢

失败率高达80%,企业数字化转型路上有哪些挑战?

NowCoder 反转链表

迅为IMX6Q开发板QT系统移植tinyplay

实战解惑 | OpenCV中如何提取不规则ROI区域

Node mongodb installation

Learn kernel 3: use GDB to track the kernel call chain

Count the running time of PHP program and set the maximum running time of PHP

Ultrasonic distance meter based on 51 single chip microcomputer

【MySQL从入门到精通】【高级篇】(四)MySQL权限管理与控制

软件测试之测试评估
随机推荐
AI and Life Sciences
No servers available for service: xxxx
2022 game going to sea practical release strategy
Leetcode t47: full arrangement II
Docker compose public network deployment redis sentinel mode
leetcode:6110. 网格图中递增路径的数目【dfs + cache】
opencv3.2 和opencv2.4安装
[MySQL from introduction to proficiency] [advanced chapter] (V) SQL statement execution process of MySQL
LVGL 8.2 Menu
Classify boost libraries by function
LVGL 8.2 LED
Popular framework: the use of glide
PyTorch的自动求导机制详细解析,PyTorch的核心魔法
SqlServer函数,存储过程的创建和使用
Data center concept
Codeforce:c. sum of substrings
Sqlserver functions, creation and use of stored procedures
Leetcode T48:旋转图像
R language uses follow up of epidisplay package The plot function visualizes the longitudinal follow-up map of multiple ID (case) monitoring indicators, and uses stress The col parameter specifies the
Explain of SQL optimization