In the meantime, I found some potential approaches. One is to use Row
and SpanFromLeft
bl = 182;
Grid[{
{7, 11, 11, 5},
{2, 3, 4, 5},
{Row@{Button["Hello", ImageSize -> {bl/3, Full}],
Button["Hello", ImageSize -> {bl/3, Full}],
Button["Hello", ImageSize -> {bl/3, Full}]}, SpanFromLeft},
{Row @{Button["Hello", ImageSize -> {bl/2, Full}],
Button["Hello", ImageSize -> {bl/2, Full}]}, SpanFromLeft}
}, ItemSize -> {{1, 3, 7, 1}, Full}, Frame -> All]
There are two problems with this approach: the dividers do not appear and bl
is chosen by hand (automatic, depending on the grid's ItemSize
would be ideal, though converting ImageSize
and ItemSize
units doesn't seem trivial).
Alternatively, one could think of grids within a grid
bl = 170;
Grid[{
{Grid[{
{7, 11, 11, 5},
{2, 3, 4, 5}
}, Frame -> All, ItemSize -> {{1, 3, 7, 1}, Full}]},
{Grid[{{Button["Hello", ImageSize -> {bl/3, Full}],
Button["Hello", ImageSize -> {bl/3, Full}],
Button["Hello", ImageSize -> {bl/3, Full}]}}, Frame -> All,
ItemSize -> 4.3]},
{Grid[{{Button["Hello", ImageSize -> {bl/2, Full}],
Button["Hello", ImageSize -> {bl/2, Full}]}}, Frame -> All,
ItemSize -> 6.9]}
}, ItemSize -> {Full, Full}, GridFrameMargins -> 0]
This gets me close, though Frame
becomes a mess. Perhaps using the old GridFrameMargins
function could help somehow, but I'm not seeing how. Again, the issue of setting an automatic ItemSize
becomes relevant. Any further ideas or comments are appreciated.