Bug introduced in 7.0 or earlier and persisting through 11.0 or later. Fixed in 13.0.0 or earlier
I have run into another problem with Grid
today.
An explicitly specified ItemSize
is being ignored:
dot = Graphics[{Pink, Disk[]}, ImageSize -> 40];
tab = {{"Type", "Name", \[SpanFromLeft], \[SpanFromLeft],
Item[dot, ItemSize -> 2.7],
Item["Esculap",
Alignment ->
Left], \[SpanFromLeft], \[SpanFromLeft]}, {\[SpanFromAbove],
"Dia.", "Spec", \[SpanFromLeft], \[SpanFromAbove],
Item[8.3 "mm", ItemSize -> {3.5, 2.7}, Alignment -> Right],
Item[11, Alignment -> Right], "6.3"}, {Item[dot, ItemSize -> 2.7],
Item["Flycatcher",
Alignment -> Left], \[SpanFromLeft], \[SpanFromLeft],
Item[dot, ItemSize -> 2.7],
Item["Apus",
Alignment ->
Left], \[SpanFromLeft], \[SpanFromLeft]}, {\[SpanFromAbove],
Item[6.9 "mm", ItemSize -> {3.5, 2.7}, Alignment -> Right],
Item[17, Alignment -> Right], "9.8", \[SpanFromAbove],
Item[7.8 "mm", ItemSize -> {3.5, 2.7}, Alignment -> Right],
Item[8, Alignment -> Right], "6.7"}};
Grid[tab,
Spacings -> {Automatic, {{0, -1.1}}},
Alignment -> {Center, Center},
Dividers -> All
]
Please note Item[8.3 "mm", ItemSize -> {3.5, 2.7}, Alignment -> Right]
where a vertical ItemSize is explicitly specified, yet it is ignored in the layout.
If the "Spec" cell is not spanned this does not happen:
tab[[2, 4]] = "X";
Grid[tab,
Spacings -> {Automatic, {{0, -1.1}}},
Alignment -> {Center, Center},
Dividers -> All
]
Is this another bug in
Grid
?Is it still present in version 8?
How can I best work around it?