Skip to content

Commit

Permalink
Fix documentation: Corrected Python code snippet for menu navigation …
Browse files Browse the repository at this point in the history
…example.
  • Loading branch information
pesricha committed Dec 23, 2024
1 parent 03054f9 commit adb8e92
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/tutorials/articles/understanding_gui/step_07/step_07.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ For example, this code creates a menu with two options:

=== "Python"
```python
from taipy import Gui
from taipy.gui import Gui, navigate
import taipy.gui.builder as tgb


Expand All @@ -88,15 +88,15 @@ For example, this code creates a menu with two options:
lov=[('Page-1', 'Page 1'), ('Page-2', 'Page 2')],
on_action=menu_option_selected)

with tgb.Page() as page_1:
tgb.text("## This is page 1", mode="md")
with tgb.Page() as page_2:
tgb.text("## This is page 2", mode="md")
with tgb.Page() as page_1:
tgb.text("## This is page 1", mode="md")
with tgb.Page() as page_2:
tgb.text("## This is page 2", mode="md")

pages = {
"/": root_page,
"page1": page_1,
"page2": page_2
"Page-1": page_1,
"Page-2": page_2
}
Gui(pages=pages).run()
```
Expand Down

0 comments on commit adb8e92

Please sign in to comment.