Skip to content

Commit

Permalink
Merge pull request #1243 from pesricha/bug/#1242-fix_documentation_ex…
Browse files Browse the repository at this point in the history
…ample

Fix documentation: Corrected Python code snippet for menu navigation example.
  • Loading branch information
AlexandreSajus authored Dec 24, 2024
2 parents 03054f9 + f569aba commit 8d99588
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 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,17 +88,17 @@ 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")

pages = {
"/": root_page,
"page1": page_1,
"page2": page_2
}
Gui(pages=pages).run()
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,
"Page-1": page_1,
"Page-2": page_2
}
Gui(pages=pages).run()
```
=== "Markdown"
```python
Expand Down

0 comments on commit 8d99588

Please sign in to comment.