lvgl / lv_demos

Examples, tutorials and applications for the LVGL embedded GUI library
https://lvgl.io
492 stars 366 forks source link

example 3 of text area #82

Closed uraich closed 3 years ago

uraich commented 4 years ago

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

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.

kisvegabor commented 4 years ago

@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?

uraich commented 4 years ago

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

kisvegabor commented 4 years ago

Thanks, I've fixed it based on your example: https://github.com/lvgl/lv_examples/commit/8dc003a85af5a365e9f5dd9ccd3a23bc67756bd4

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.

uraich commented 4 years ago

Sure, I will follow your naming conventions. As I said, for the moment it is "work in progress".Currently I am working in the widgets_demo.Sent from my Samsung Galaxy smartphone. -------- Original message --------From: Gabor Kiss-Vamosi notifications@github.com Date: 11/3/20 14:38 (GMT+01:00) To: lvgl/lv_examples lv_examples@noreply.github.com Cc: Uli Raich uli.raich@gmail.com, Mention mention@noreply.github.com Subject: Re: [lvgl/lv_examples] example 3 of text area (#82) 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.

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/lvgl/lv_examples/issues/82#issuecomment-721120403", "url": "https://github.com/lvgl/lv_examples/issues/82#issuecomment-721120403", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

stale[bot] commented 3 years ago

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.