Skip to content

ScrollableContainer with Grid Layout #5761

Closed Answered by TomJGooding
TheElevatedOne asked this question in Q&A
Discussion options

You must be logged in to vote

Maybe try something like this, ensuring the grid height is auto?

class ExampleApp(App):
    CSS = """
    #thumbnails-grid {
        height: auto;
        layout: grid;
        grid-size: 2;
    }
    """

    def compose(self) -> ComposeResult:
        with VerticalScroll(id="thumbnails-container"):
            with Grid(id="thumbnails-grid"):
                # yield Images...

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@TheElevatedOne
Comment options

@TomJGooding
Comment options

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