2

This grid works:

Grid[Table[Append[ConstantArray[1, 5],
If[i === 1, Button["", 0;, ImageSize -> {30, 315}], SpanFromAbove]],
{i, 20}], Alignment -> {Center, Center}, Frame -> All]

I want the first row to be one single place, except for the button, but when I do it, it gets crap:

Grid[Table[Append[If[i === 1, Prepend[ConstantArray[SpanFromLeft, 4], 1], ConstantArray[1, 5]],
If[i === 1, Button["", 0;, ImageSize -> {30, 300}], SpanFromAbove]],
{i, 20}], Alignment -> {Center, Center}, Frame -> All]

What can I do to the second piece of code to make the button align like it did the first time?

Coolwater
  • 20,257
  • 3
  • 35
  • 64

1 Answers1

0

Would it be acceptable for you to combine the grid and the button using Row?

In[129]:= Framed[Row[{Grid[Table[ConstantArray[1, 5], {20}], Frame ->All],
Spacer[2],Button["", 0;, ImageSize -> {30, 315}]}], FrameMargins -> 0]

This may give you more flexibility in layout options.

John McGee
  • 2,538
  • 11
  • 15