feat(textarea): make it possible to customize the bullet character (#3388)

* feat(textarea): Make it possible to customise the bullet character

This adds functions to allow overriding the default bullet character
with a custom one (or even no character at all).

* Update docs/widgets/core/textarea.md

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
Johannes Marbach
2022-05-30 12:05:22 +02:00
committed by GitHub
parent 6ad52a7119
commit eef838f51f
3 changed files with 69 additions and 9 deletions

View File

@@ -63,8 +63,7 @@ In this mode the height is set automatically to show only one line, line break c
### Password mode
The text area supports password mode which can be enabled with `lv_textarea_set_password_mode(textarea, true)`.
If the `•` ([Bullet, U+2022](http://www.fileformat.info/info/unicode/char/2022/index.htm)) character exists in the font, the entered characters are converted to it after some time or when a new character is entered.
If `•` not exists, `*` will be used.
By default, if the `•` ([Bullet, U+2022](http://www.fileformat.info/info/unicode/char/2022/index.htm)) character exists in the font, the entered characters are converted to it after some time or when a new character is entered. If `•` does not exist in the font, `*` will be used. You can override the default character with `lv_textarea_set_password_bullet(textarea, "x")`.
In password mode `lv_textarea_get_text(textarea)` returns the actual text entered, not the bullet characters.