acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

lv_example_label_1.py (821B)

      1 #
      2 # Show line wrap, re-color, line align and text scrolling.
      3 #
      4 label1 = lv.label(lv.scr_act())
      5 label1.set_long_mode(lv.label.LONG.WRAP)      # Break the long lines*/
      6 label1.set_recolor(True)                      # Enable re-coloring by commands in the text
      7 label1.set_text("#0000ff Re-color# #ff00ff words# #ff0000 of a# label, align the lines to the center"
      8                               "and  wrap long text automatically.")
      9 label1.set_width(150)                         # Set smaller width to make the lines wrap
     10 label1.set_style_text_align(lv.ALIGN.CENTER, 0)
     11 label1.align(lv.ALIGN.CENTER, 0, -40)
     12 
     13 
     14 label2 = lv.label(lv.scr_act())
     15 label2.set_long_mode(lv.label.LONG.SCROLL_CIRCULAR) # Circular scroll
     16 label2.set_width(150)
     17 label2.set_text("It is a circularly scrolling text. ")
     18 label2.align(lv.ALIGN.CENTER, 0, 40)
     19