Skip to content
Discussion options

You must be logged in to vote

after amount of trying different stuff , Figured out simple solution to sleep main thread a part of second as follow

from textual import on
from textual.app import App, ComposeResult
from textual.containers import Horizontal
from textual.widgets import OptionList, TabbedContent, TabPane
import asyncio



class ExampleApp(App):
    CSS = """
    TabbedContent {
        width: 70%
    }

    OptionList {
        width: 30%;
        height: 100%;
    }
    """


    def compose(self) -> ComposeResult:
        with Horizontal():
            yield TabbedContent()
            yield OptionList("Hold", "the", "down", "key")

    def on_mount(self) -> None:
        option_list = self.query_one(Opt…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@TomJGooding
Comment options

@MohamedElgamal
Comment options

Comment options

You must be logged in to vote
2 replies
@MohamedElgamal
Comment options

Answer selected by MohamedElgamal
@TomJGooding
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