Given the following example, how can I make each Framed
object to fill its Grid
cell both vertically and horizontally? Obviously, Grid
calculates some cell sizes, that Button
knows of, but not Framed
, Pane
, Panel
, etc. How can I reproduce the behavior of Button
with other constructs without relying on explicit numbers?
ClearAll[b, f1, f2];
b = Button[#, Background -> LightGray, ImageSize -> Full] &;
f1 = Framed[#, Background -> LightGray, RoundingRadius -> 5] &;
f2 = Framed[#, Background -> LightGray, RoundingRadius -> 5, ImageSize -> Full] &;
Grid[{{b@"321\n123", b@"123456789"}, {b@"321", SpanFromLeft}},
Spacings -> {0, 0}, Frame -> None],
Grid[{{f1@"321\n123", f1@"123456789"}, {f1@"321", SpanFromLeft}},
Spacings -> {0, 0}, Frame -> None],
Grid[{{f2@"321\n123", f2@"123456789"}, {f2@"321", SpanFromLeft}},
Spacings -> {0, 0}, Frame -> None]
![enter image description here](https://community.wolfram.com//c/portal/getImageAttachment?filename=GSyaR.png&userId=509321)