Skip to content

What's the width of a greedy widget that comes after a widget that already exceeded available space? #431

Closed Answered by amano-kenji
amano-kenji asked this question in Q&A
Discussion options

You must be logged in to vote

https://github.com/jtdaugherty/brick/blob/master/docs/guide.rst says

rendering the box layout algorithm has to be careful about rendering such Greedy widgets because they won't leave room for anything else. Since the box widget cannot know the sizes of its sub-widgets until they are rendered, the Fixed widgets get rendered and their sizes are used to determine how much space is left for Greedy widgets.

Thus, it seems the third greedyText widget is knocked out and not rendered.

The basics seem to be understood only after writing some code and reading the documentation multiple times.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@jtdaugherty
Comment options

Answer selected by amano-kenji
Comment options

You must be logged in to vote
1 reply
@jtdaugherty
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