fix(examples) join usage (#2425)
Use 'join' correctly on Python scripts
This commit is contained in:
@@ -10,16 +10,16 @@ def event_handler(e):
|
||||
# Create a normal drop down list
|
||||
dd = lv.dropdown(lv.scr_act())
|
||||
dd.set_options("\n".join([
|
||||
"Apple\n"
|
||||
"Banana\n"
|
||||
"Orange\n"
|
||||
"Cherry\n"
|
||||
"Grape\n"
|
||||
"Raspberry\n"
|
||||
"Melon\n"
|
||||
"Orange\n"
|
||||
"Lemon\n"
|
||||
"Nuts\n"]))
|
||||
"Apple",
|
||||
"Banana",
|
||||
"Orange",
|
||||
"Cherry",
|
||||
"Grape",
|
||||
"Raspberry",
|
||||
"Melon",
|
||||
"Orange",
|
||||
"Lemon",
|
||||
"Nuts"]))
|
||||
|
||||
dd.align(lv.ALIGN.TOP_MID, 0, 20)
|
||||
dd.add_event_cb(event_handler, lv.EVENT.ALL, None)
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
#
|
||||
|
||||
opts = "\n".join([
|
||||
"Apple\n"
|
||||
"Banana\n"
|
||||
"Orange\n"
|
||||
"Melon\n"
|
||||
"Grape\n"
|
||||
"Apple",
|
||||
"Banana",
|
||||
"Orange",
|
||||
"Melon",
|
||||
"Grape",
|
||||
"Raspberry"])
|
||||
|
||||
dd = lv.dropdown(lv.scr_act())
|
||||
|
||||
@@ -30,12 +30,12 @@ def event_cb(e):
|
||||
# Create a drop down list
|
||||
dropdown = lv.dropdown(lv.scr_act())
|
||||
dropdown.align(lv.ALIGN.TOP_LEFT, 10, 10)
|
||||
dropdown.set_options("".join([
|
||||
"New project\n",
|
||||
"New file\n",
|
||||
"Open project\n",
|
||||
"Recent projects\n",
|
||||
"Preferences\n",
|
||||
dropdown.set_options("\n".join([
|
||||
"New project",
|
||||
"New file",
|
||||
"Open project",
|
||||
"Recent projects",
|
||||
"Preferences",
|
||||
"Exit"]))
|
||||
|
||||
# Set a fixed text to display on the button of the drop-down list
|
||||
|
||||
Reference in New Issue
Block a user