Container that reflows its children

For Horizon EDA, I need a container that reflows its children like words in a label. GtkFlowBox doesn’t cut as it arranges its children in a grid, so if one child is particularly wide, all other children in the same column will be as wide.

DzlColumnLayout from libdazzle comes close, but operates the wrong way round as it arranges its children in a single row first.

Is there any existing container widget that does this, or do I have to roll my own based on DzlColumnLayout?

Before GtkFlowBox was merged, there was something called GtkSpreadTable, which you might be able to find floating around in some branch somewhere. Iirc, that had a mode like the one you are asking for.

Hm, it’s not entirely clear from the description

GtkSpreadTable positions its children by distributing them as
evenly as possible across a fixed number of rows or columns.
When oriented vertically the GtkSpreadTable will list its
children in order from top to bottom in columns and request
the smallest height as possible regardless of differences in
child sizes.

Seems like I’ll have to roll my own.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.