Is it possible to make one ("Comment" in the example below) column to dynamically resize to fill available formatting width e.g. window?

I can't figure if it's possible with ItemSize -> Scaled[...] because I'd like to have the first two columns to be of their natural size (ItemSize->Full).

Thanks in advance.

enter image description here


1 Answer 1


You can wrap comments with Pane and use the option ImageSize -> Full:

grid = {{"Name", "Value", "Comment"},
    {"name1", 123.2, ""},
    {"name2", 321.12332,  Pane["potentially very long commment ....................", 
     Alignment -> Center, ImageSize -> Full]}};

Grid[grid, Dividers -> All, Alignment -> {Center, Center}]

enter image description here

If we change the notebook's window width the width of the third column is adjusted:

enter image description here

  • $\begingroup$ Thanks, this is exactly what I need! $\endgroup$ May 6, 2020 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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