Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing border of RichLog makes it disappear in TabPane #5472

Open
basnijholt opened this issue Jan 11, 2025 · 1 comment
Open

Removing border of RichLog makes it disappear in TabPane #5472

basnijholt opened this issue Jan 11, 2025 · 1 comment

Comments

@basnijholt
Copy link

basnijholt commented Jan 11, 2025

As discussed on Discord.

In the MRE below, when I have the border: solid green 0% line:

image But with that line removed: image
from textual.app import App, ComposeResult
from textual.containers import Container
from textual.widgets import TabbedContent, TabPane, RichLog


class MinimalApp(App):
    """A minimal Textual app demonstrating the RichLog border issue."""

    CSS = """
    TabbedContent {
        height: 100%;
    }

    #title-container {
        align: center middle;
    }

    #title-rich-log {
        overflow-y: auto;
        background: black 0%;
        width: auto;
        height: auto;
        /* When removing the border, the whole thing is gone? */
        border: solid green 0%;
    }
    """

    def compose(self) -> ComposeResult:
        """Create child widgets for the app."""
        with TabbedContent():
            with TabPane("Title Slide", id="title-slide-tab"):
                yield Container(RichLog(id="title-rich-log"), id="title-container")

    def on_mount(self) -> None:
        """Add some text to the RichLogs."""
        title_rich_log = self.query_one("#title-rich-log", RichLog)
        title_rich_log.write("This is the Title Slide RichLog")


if __name__ == "__main__":
    app = MinimalApp()
    app.run()

Using textual==1.0.0

Copy link

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant