Skip to content
Discussion options

You must be logged in to vote

To start with, you could do what you're trying to do like this:

from textual.app import ComposeResult, App
from textual.widgets import TabbedContent, TabPane, Markdown

LETO = """
# Duke Leto I Atreides

Head of House Atreides.
"""

JESSICA = """
# Lady Jessica

Bene Gesserit and concubine of Leto, and mother of Paul and Alia.
"""

PAUL = """
# Paul Atreides

Son of Leto and Jessica.
"""

class myApp(App):
    def compose(self) -> ComposeResult:
        with TabbedContent(id="Network"):
            with TabPane("LETO"):
                yield Markdown(LETO)
            with TabPane("JESSICA"):
                yield Markdown(JESSICA)
            with TabPane("PAUL"):
                yield M…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Yurii-huang
Comment options

@davep
Comment options

Answer selected by Yurii-huang
@Yurii-huang
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants