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_dropdown_2.py (705B)

      1 #
      2 # Create a drop down, up, left and right menus
      3 #
      4 
      5 opts = "\n".join([
      6     "Apple",
      7     "Banana",
      8     "Orange",
      9     "Melon",
     10     "Grape",
     11     "Raspberry"])
     12 
     13 dd = lv.dropdown(lv.scr_act())
     14 dd.set_options_static(opts)
     15 dd.align(lv.ALIGN.TOP_MID, 0, 10)
     16 dd = lv.dropdown(lv.scr_act())
     17 dd.set_options_static(opts)
     18 dd.set_dir(lv.DIR.BOTTOM)
     19 dd.set_symbol(lv.SYMBOL.UP)
     20 dd.align(lv.ALIGN.BOTTOM_MID, 0, -10)
     21 
     22 dd = lv.dropdown(lv.scr_act())
     23 dd.set_options_static(opts)
     24 dd.set_dir(lv.DIR.RIGHT)
     25 dd.set_symbol(lv.SYMBOL.RIGHT)
     26 dd.align(lv.ALIGN.LEFT_MID, 10, 0)
     27 
     28 dd = lv.dropdown(lv.scr_act())
     29 dd.set_options_static(opts)
     30 dd.set_dir(lv.DIR.LEFT)
     31 dd.set_symbol(lv.SYMBOL.LEFT)
     32 dd.align(lv.ALIGN.RIGHT_MID, -10, 0)
     33 
     34