lvgl / lv_demos

Examples, tutorials and applications for the LVGL embedded GUI library

Home Page:https://lvgl.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

example 3 of text area

uraich opened this issue · comments

I don't like example 3 (auto text formatting)very much: It is supposed to show a text in form of 12:34.
However:

  • If you press the accept button, all further input is rejected.
  • If you press the reject button, the keyboard disappears altogether
  • If you use the left button followed by a backspace you can easily create something like 1:234

When writing the micropython version of the example I created a different keyboard without the accept, reject, +- and . buttons. In the event handler I make sure that no more than 2 digits can appear before and after the : If you try, these digits are immediately deleted again.

@uraich
I agree to have a custom keyboard layout here. Also would be curious about your solution for correct formatting. Have you already uploaded it anywhere?

Hi Gabor
If you want to have a look: I just uploaded my current micropython examples to
https://github.com/uraich/lv_mpy_examples
Things are not ready yet but most of the examples work ok. I still have to better understand animations to get the 3rd msgbox example to work. I tried to stay as close as possible to the C originals.
init_guy.py will probably change to include the ili9341 driver.
I added lv_colors.py, defining the colors.
Concerning the textarea example I chose a format 0..2 digits followed by : followed by 0..2 digits. Please correct me if this is wrong (widgets/ex3_textarea.py)
I copied init_gui.py and lv_colors.py to $HOME/.micropython/lib. My micropython binary can be reached on
/opt/bin/lv_micropython. On a Linux PC all programs can be run as ./example.py

Thanks, I've fixed it based on your example: 8dc003a

Finally, we should add the MPy examples in lv_examples. It might be reasonable to follow its structure to have less stuff to refactor in the end.

commented

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.