Re: Nested Grids
- To: mathgroup at smc.vnet.net
- Subject: [mg89656] Re: Nested Grids
- From: Helen Read <hpr at together.net>
- Date: Mon, 16 Jun 2008 06:42:05 -0400 (EDT)
- References: <g32q6b$c37$1@smc.vnet.net>
- Reply-to: HPR <read at math.uvm.edu>
David Park wrote:
> Nested Grids would seem to be a very useful construct because subportions of
> a large grid could be independently developed. However, I have been studying
> the tutorial/GridsRowsAndColumns and it has only one example and that
> example hides a defect. Here is the slightly modified example with Frames
> added for all elements:
>
> Grid[{{Grid[{{a, b}, {c, d}}, Frame -> All, Background -> Orange],
> e}, {f, g}},
> Frame -> All]
>
> The problem is that the nested Grid does not fill its space. If we use
> Dividers -> Central, they also do not fill to the edges of the containing
> item. It seems that we need something like an ImageMargins option, but that
> is not available.
Try using Spacings.
Grid[{{Grid[{{a, b}, {c, d}}, Dividers -> Center,
Background -> Orange], e}, {f, g}}, Frame -> All,
Spacings -> {0, 0}]
And of course the inner and outer Grids can have different Spacings.
Grid[{{Grid[{{a, b}, {c, d}}, Background -> Orange,
Dividers -> Center, Spacings -> {3, 3}], e}, {f, g}},
Frame -> All, Spacings -> {0, 0}]
Grid[{{Grid[{{a, b}, {c, d}}, Background -> Orange,
Dividers -> Center, Spacings -> {3, 3}], e}, {f, g}},
Frame -> All, Spacings -> {{0, {0}, 10}, {0, {0}, 20}}]
I get a very slight defect on some of these, with the orange background
not *quite* filling down to the Frame between {c,d} and f.
--
Helen Read
University of Vermont