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

边栏推荐
- Data center concept
- AI and Life Sciences
- LVGL 8.2 List
- 利用Shap值进行异常值检测
- Docker compose public network deployment redis sentinel mode
- R language ggplot2 visualization: gganimate package creates animated graph (GIF) and uses anim_ The save function saves the GIF visual animation
- Real time data warehouse
- RK1126平台OSD的实现支持颜色半透明度多通道支持中文
- LVGL 8.2 Line wrap, recoloring and scrolling
- Test process arrangement (2)
猜你喜欢

Nowcoder reverse linked list

STM32F1与STM32CubeIDE编程实例-MAX7219驱动8位7段数码管(基于GPIO)

Pandora IOT development board learning (RT thread) - Experiment 3 button experiment (learning notes)

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

实时数据仓库

统计php程序运行时间及设置PHP最长运行时间

第十七章 进程内存

scratch古堡历险记 电子学会图形化编程scratch等级考试三级真题和答案解析2022年6月

【MySQL从入门到精通】【高级篇】(五)MySQL的SQL语句执行流程

Digi restarts XBee Pro S2C production. Some differences need to be noted
随机推荐
Sqlserver functions, creation and use of stored procedures
The failure rate is as high as 80%. What are the challenges on the way of enterprise digital transformation?
Digi重启XBee-Pro S2C生产,有些差别需要注意
LVGL 8.2 Line
R language ggplot2 visualization: gganimate package creates animated graph (GIF) and uses anim_ The save function saves the GIF visual animation
商業智能BI財務分析,狹義的財務分析和廣義的財務分析有何不同?
Explain of SQL optimization
[cloud native] how can I compete with this database?
一文概览2D人体姿态估计
【算法leetcode】面试题 04.03. 特定深度节点链表(多语言实现)
【C语言】指针笔试题
数据湖(十三):Spark与Iceberg整合DDL操作
Opencv learning notes - linear filtering: box filtering, mean filtering, Gaussian filtering
Codeforce:c. sum of substrings
ML之shap:基于boston波士顿房价回归预测数据集利用Shap值对LiR线性回归模型实现可解释性案例
LifeCycle
聊聊保证线程安全的 10 个小技巧
Visual Studio调试方式详解
[information retrieval] experiment of classification and clustering
Intelligence d'affaires bi analyse financière, analyse financière au sens étroit et analyse financière au sens large sont - ils différents?