I'd like use rounded rectangles for my cell style, but I'm not sure if this is possible. Perhaps it can be faked with an image as a background for it?

  • $\begingroup$ Framed has the option RoundingRadius. This is not for cell frames though, but it may lead the way to a solution. $\endgroup$
    – Szabolcs
    Mar 1, 2013 at 18:42

2 Answers 2


I don't think this is possible. One can set the four sides of the cell frame to various different styles using the undocumented option CellFrameStyle which you have to prefix with the System` context to get it to work (syntax coloring won't recognize it as a valid option):

   StringTake[ExampleData[{"Text", "AliceInWonderland"}], {200, 1000}], 
   CellFrame -> True, 
   System`CellFrameStyle -> 
    { Directive[Red, Thickness[5] ], 
      Directive[Green, Thickness[10], Dashed ], 
      Directive[Blue, Thickness[5] , Dotted], 
      Directive[Gray, Thickness[5] , Dashing[{20, 3}]]
   CellMargins -> {{100, 50}, {5, 5}}]]

Mathematica graphics.

The fact that you can specify it as four separate frame parts make me believe rounded corners are not possible. With sides specified separately I don't think an option like RoundingRadius would work.

  • $\begingroup$ On my system (v9 Linux), the System context is not required, and Dashed and Dotted do not seem to work the same as your example (but Dashing does). CapForm or JoinForm might be useful for producing rounding but also do not work. $\endgroup$
    – Xerxes
    Mar 1, 2013 at 23:45
  • $\begingroup$ @xerxes interesting. On Windows, using it without context, doesn't do anything. Upon inspection of the cell code (ctrl shift E) I see an extra $CellContext tagged to CellFrameStyle. Tagging it with System prevents this. $\endgroup$ Mar 2, 2013 at 9:00

You might work around the limitations of CellFrame by framing the content. Framed allows for a RoundingRadius.

ExampleData[{"Text", "AliceInWonderland"}], {200, 1000}], "Text", 
CellMargins -> {{100, 50}, {5, 5}}], RoundingRadius -> 15, 
FrameStyle -> Red]]

enter image description here

  • $\begingroup$ Sorry, Szabolcs. I only noticed your comment after answering the question. Really. $\endgroup$
    – DavidC
    Mar 1, 2013 at 23:44
  • 1
    $\begingroup$ You notice the artefacts this yields in the text? $\endgroup$ Mar 1, 2013 at 23:49
  • $\begingroup$ Thanks. Placing Framed around the TextCell seems to take care of it. $\endgroup$
    – DavidC
    Mar 2, 2013 at 0:00
  • 1
    $\begingroup$ Much better. Though not really a cell frame as asked by the OP, I think this is the closest to what it would look like. $\endgroup$ Mar 2, 2013 at 8:56
  • $\begingroup$ Yes but this won't work in a style sheet :/ $\endgroup$
    – M.R.
    Mar 4, 2013 at 9:08

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.