Skip to content
Discussion options

You must be logged in to vote

Hey Posho, glad you're enjoying Textual. As you've probably guessed much has changed from 0.1.0 to 0.2.0 (and beyond) and while Rich renderables will still work (with I believe (I've only really come on board with 0.2.0) some differences to how you use them) much of what you're wanting to do here is likely better done now using the full features of CSS.

So, for example, as I understand it, you want some red text inside a box? Now you could do this:

from textual.app import App, RenderResult, ComposeResult
from textual.widgets import Label

class Hello( Label ):

    DEFAULT_CSS = """
    Hello {
        border: round white;
        height: 100%;
    }
    """

    def render(self) -> Rende…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@PoshoDev
Comment options

@davep
Comment options

@PoshoDev
Comment options

@davep
Comment options

@PoshoDev
Comment options

Answer selected by davep
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
Converted from issue

This discussion was converted from issue #1303 on November 29, 2022 08:36.