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
|
# Create a normal drop down list
|
||||||
dd = lv.dropdown(lv.scr_act())
|
dd = lv.dropdown(lv.scr_act())
|
||||||
dd.set_options("\n".join([
|
dd.set_options("\n".join([
|
||||||
"Apple\n"
|
"Apple",
|
||||||
"Banana\n"
|
"Banana",
|
||||||
"Orange\n"
|
"Orange",
|
||||||
"Cherry\n"
|
"Cherry",
|
||||||
"Grape\n"
|
"Grape",
|
||||||
"Raspberry\n"
|
"Raspberry",
|
||||||
"Melon\n"
|
"Melon",
|
||||||
"Orange\n"
|
"Orange",
|
||||||
"Lemon\n"
|
"Lemon",
|
||||||
"Nuts\n"]))
|
"Nuts"]))
|
||||||
|
|
||||||
dd.align(lv.ALIGN.TOP_MID, 0, 20)
|
dd.align(lv.ALIGN.TOP_MID, 0, 20)
|
||||||
dd.add_event_cb(event_handler, lv.EVENT.ALL, None)
|
dd.add_event_cb(event_handler, lv.EVENT.ALL, None)
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
opts = "\n".join([
|
opts = "\n".join([
|
||||||
"Apple\n"
|
"Apple",
|
||||||
"Banana\n"
|
"Banana",
|
||||||
"Orange\n"
|
"Orange",
|
||||||
"Melon\n"
|
"Melon",
|
||||||
"Grape\n"
|
"Grape",
|
||||||
"Raspberry"])
|
"Raspberry"])
|
||||||
|
|
||||||
dd = lv.dropdown(lv.scr_act())
|
dd = lv.dropdown(lv.scr_act())
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ def event_cb(e):
|
|||||||
# Create a drop down list
|
# Create a drop down list
|
||||||
dropdown = lv.dropdown(lv.scr_act())
|
dropdown = lv.dropdown(lv.scr_act())
|
||||||
dropdown.align(lv.ALIGN.TOP_LEFT, 10, 10)
|
dropdown.align(lv.ALIGN.TOP_LEFT, 10, 10)
|
||||||
dropdown.set_options("".join([
|
dropdown.set_options("\n".join([
|
||||||
"New project\n",
|
"New project",
|
||||||
"New file\n",
|
"New file",
|
||||||
"Open project\n",
|
"Open project",
|
||||||
"Recent projects\n",
|
"Recent projects",
|
||||||
"Preferences\n",
|
"Preferences",
|
||||||
"Exit"]))
|
"Exit"]))
|
||||||
|
|
||||||
# Set a fixed text to display on the button of the drop-down list
|
# Set a fixed text to display on the button of the drop-down list
|
||||||
|
|||||||
Reference in New Issue
Block a user