current position:Home>[LVGL] Introduction to long mode of text labels

[LVGL] Introduction to long mode of text labels

2022-11-24 23:08:10Evenurs

1. Introduction

Long mode refers to the mode that when the data in the LVGL label is larger than the object width when it is actually displayed, because the data content is too long, a new suitable mode is switched to display the data content.

2. Official enumeration format

enum {LV_LABEL_LONG_EXPAND, //Expand the object size to fit the text sizeLV_LABEL_LONG_BREAK, //Keep the object width, if the text exceeds the width, it will wrap, and the object fits the text size in heightLV_LABEL_LONG_DOT, //Keep the size of the object, replace the remaining content with "..." at the end of the visible textLV_LABEL_LONG_SROLL, //Keep the size of the object, the text scrolls back and forthLV_LABEL_LONG_SROLL_CIRC, //Keep the size of the object, and scroll the text circularlyLV_LABEL_LONG_CROP, //Keep the size of the object, remove the text that cannot be displayed};

3. Chinese description of enumeration type

enum {
LV_LABEL_LONG_EXPAND, //Expand the size of the object to fit the size of the text
LV_LABEL_LONG_BREAK, //Keep the width of the object, wrap the text if it exceeds the width, and adapt the object to the size of the text in height
LV_LABEL_LONG_DOT,    //Keep the size of the object, replace the remaining content with "..." at the end of the visible text
LV_LABEL_LONG_SROLL, //Keep the size of the object, the text scrolls back and forth
LV_LABEL_LONG_SROLL_CIRC, //Keep the size of the object, text circularCircular scrolling
LV_LABEL_LONG_CROP, //Keep the size of the object, remove the text that cannot be displayed
};

Four. Summary

Generally, break and sroll are often used in limited-width designs.

copyright notice
author[Evenurs],Please bring the original link to reprint, thank you.
https://en.chowdera.com/2022/328/202211242305595984.html

Random recommended