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

边栏推荐
- 电商系统中红包活动设计
- Chapter 16 string localization and message Dictionary (2)
- 开发中常见问题总结
- C language set operation
- 使用CLion编译OGLPG-9th-Edition源码
- 關於miui12.5 紅米k20pro用au或者povo2出現問題的解决辦法
- Digi重启XBee-Pro S2C生产,有些差别需要注意
- ML之shap:基于boston波士顿房价回归预测数据集利用shap值对XGBoost模型实现可解释性案例
- Ultrasonic distance meter based on 51 single chip microcomputer
- Chapter 17 process memory
猜你喜欢

NowCoder 反转链表

Opencv learning notes - linear filtering: box filtering, mean filtering, Gaussian filtering

Query optimizer for SQL optimization

leetcode:6110. 网格图中递增路径的数目【dfs + cache】

Chapter 17 process memory
![[MySQL from introduction to proficiency] [advanced chapter] (V) SQL statement execution process of MySQL](/img/58/a8dbed993921f372d04f7a1ee19679.png)
[MySQL from introduction to proficiency] [advanced chapter] (V) SQL statement execution process of MySQL

基于51单片机的超声波测距仪

开发中常见问题总结

Real time data warehouse

Gin integrated Alipay payment
随机推荐
leetcode:6110. The number of incremental paths in the grid graph [DFS + cache]
Count the running time of PHP program and set the maximum running time of PHP
redis 日常笔记
MySQL triggers
《opencv学习笔记》-- 线性滤波:方框滤波、均值滤波、高斯滤波
Explain of SQL optimization
2022 game going to sea practical release strategy
(1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
Detailed index of MySQL
尊重他人的行为
LVGL 8.2 LED
LVGL 8.2 List
C language achievement management system for middle school students
What is the difference between Bi financial analysis in a narrow sense and financial analysis in a broad sense?
LVGL 8.2 Menu
Solutions to the problems of miui12.5 red rice k20pro using Au or povo2
Ml: introduction, principle, use method and detailed introduction of classic cases of snap value
关于miui12.5 红米k20pro用au或者povo2出现问题的解决办法
Solutions aux problèmes d'utilisation de l'au ou du povo 2 dans le riz rouge k20pro MIUI 12.5
实战解惑 | OpenCV中如何提取不规则ROI区域