# How to draw a pane with rounded corners?

Pane[
Style["text is here", Bold, FontColor -> Darker[Gray, .6],
Background -> Red
],
Alignment -> {Center, Center}
]


How to let the pane have rounded corners?

-
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

Framed[
Pane @ Style["text is here", Bold, FontColor -> GrayLevel[0.2]],
Background -> Red,