Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
    
ImageSize -> {30, Full} helps a bit but does not solve the problem. –  Alexey Popkov Aug 9 at 15:32
    
I think this is a duplicate of my own report: (13349) -- please take a look and tell me if you disagree. –  Mr.Wizard Aug 9 at 23:54

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.