当前位置:网站首页>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
边栏推荐
- R language ggplot2 visualization: gganimate package creates dynamic line graph animation (GIF) and uses transition_ The reveal function displays data step by step along a given dimension in the animat
- Oppo find N2 product form first exposure: supplement all short boards
- Data warehouse interview question preparation
- 阿里被裁员工,找工作第N天,猎头又传来噩耗...
- Nowcoder reverse linked list
- What is the difference between Bi financial analysis in a narrow sense and financial analysis in a broad sense?
- Digi XBee 3 RF: 4个协议,3种封装,10个大功能
- LVGL 8.2 Line wrap, recoloring and scrolling
- Count the running time of PHP program and set the maximum running time of PHP
- (1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
猜你喜欢
【C语言】指针笔试题
【信息检索】分类和聚类的实验
统计php程序运行时间及设置PHP最长运行时间
第十七章 进程内存
Detailed analysis of pytorch's automatic derivation mechanism, pytorch's core magic
Detailed index of MySQL
商業智能BI財務分析,狹義的財務分析和廣義的財務分析有何不同?
Excel quickly merges multiple rows of data
Visual Studio调试方式详解
Opencv learning notes - linear filtering: box filtering, mean filtering, Gaussian filtering
随机推荐
First experience of ViewModel
Gin integrated Alipay payment
统计php程序运行时间及设置PHP最长运行时间
LVGL 8.2 LED
R language ggplot2 visualization: gganimate package creates dynamic line graph animation (GIF) and uses transition_ The reveal function displays data step by step along a given dimension in the animat
AI与生命科学
(1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
Programmer turns direction
Detailed index of MySQL
【云原生】我怎么会和这个数据库杠上了?
LVGL 8.2 keyboard
LVGL 8.2 Sorting a List using up and down buttons
关于miui12.5 红米k20pro用au或者povo2出现问题的解决办法
Leetcode 61: rotating linked list
LVGL 8.2 Line wrap, recoloring and scrolling
数据埋点的一些问题和想法
Chapter 17 process memory
Detailed analysis of pytorch's automatic derivation mechanism, pytorch's core magic
ML之shap:基于boston波士顿房价回归预测数据集利用shap值对XGBoost模型实现可解释性案例
Data warehouse interview question preparation