update asserts
This commit is contained in:
23
examples/widgets/dropdown/lv_example_dropdown_2.py
Normal file
23
examples/widgets/dropdown/lv_example_dropdown_2.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Create a drop UP list by applying auto realign
|
||||
|
||||
# Create a drop down list
|
||||
ddlist = lv.ddlist(lv.scr_act())
|
||||
ddlist.set_options("\n".join([
|
||||
"Apple",
|
||||
"Banana",
|
||||
"Orange",
|
||||
"Melon",
|
||||
"Grape",
|
||||
"Raspberry"]))
|
||||
|
||||
|
||||
ddlist.set_fix_width(150)
|
||||
ddlist.set_fix_height(150)
|
||||
ddlist.set_draw_arrow(True)
|
||||
|
||||
# Enable auto-realign when the size changes.
|
||||
# It will keep the bottom of the ddlist fixed
|
||||
ddlist.set_auto_realign(True)
|
||||
|
||||
# It will be called automatically when the size changes
|
||||
ddlist.align(None, lv.ALIGN.IN_BOTTOM_MID, 0, -20)
|
||||
Reference in New Issue
Block a user