Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
 Style["text is here", Bold, FontColor -> Darker[Gray, .6],
  Background -> Red
 Alignment -> {Center, Center}

Mathematica graphics

How to let the pane have rounded corners?

share|improve this question
Have you tried Framed instead with RoundingRadius? – Szabolcs Mar 2 '12 at 18:07
Perhaps, you want a Panel? – Mark McClure Mar 2 '12 at 18:23
The following works: Framed[Pane[ Style["XXXX", FontSize -> 11], ImageMargins -> 1, Alignment -> {Center, Center}], Background -> Pink, RoundingRadius -> 10, FrameStyle -> None] Is ImageMargins -> 1 there? Is there a way to get the spaces above and below text narrower? – qazwsx Mar 2 '12 at 18:46
FrameMargins -> 0 – Mike Honeychurch Mar 2 '12 at 23:04
@Problemania If I take the last two words of your original question (rounded corners) and type those in the search bar in Mathematica's doc center the first result is RoundingRadius and the third Framed. Similarly, your question in your comment above can be answered by studying the options of Framed in the doc page. ImageMargins -> -4 and ContentPadding -> False will do. Before posting future questions please try to do somewhat more research yourself first. – Sjoerd C. de Vries Mar 2 '12 at 23:05
up vote 3 down vote accepted

Comments that are answers should be posted as such.

  Pane @ Style["text is here", Bold, FontColor -> GrayLevel[0.2]],
  Background -> Red,
  RoundingRadius -> 10,
  FrameStyle -> None,
  FrameMargins -> 0

Mathematica graphics

share|improve this answer
How does "Comments that are answers should be posted as such." explain the answer? ;) – R. M. Mar 3 '12 at 13:59
I couldn't. I didn't have enough points. – qazwsx Mar 4 '12 at 20:59
@Problemania I am sorry, I forget the particular limitations of a new account. Was the message that you could not answer your own question for two days? If so, feel free to post your own answer, and I will delete mine. – Mr.Wizard Mar 4 '12 at 21:15

Your Answer


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.