1
0
Fabien Lelaquais 7 сар өмнө
parent
commit
6818a2d62b

+ 1 - 1
doc/gui/examples/controls/button_icon.py

@@ -15,7 +15,7 @@
 # -----------------------------------------------------------------------------------------
 from taipy.gui import Gui, Icon
 
-icon = Icon("./charles-avatar.png", "charles")
+icon = Icon("charles-avatar.png", "Charles")
 
 page = """
 <|{icon}|button|>

+ 1 - 10
doc/gui/examples/controls/button_simple.py

@@ -15,16 +15,7 @@
 # -----------------------------------------------------------------------------------------
 from taipy.gui import Gui
 
-text = None
-
-def on_action(state, id: str, payload: dict):
-    # React to the button press action.
-    state.text = f"The button '{id}' was pressed and called action '{payload.get('action')}'."
-
-page = """
-<|Button Label|button|>
-<|{text}|>
-"""
+page = "<|Button Label|button|>"
 
 if __name__ == "__main__":
     Gui(page).run(title="Button - Simple")