# Formatting Framed - some FrameStyle graphic directives don't work?

The FrameStyle option in Framed seems to work for some graphics directives but not others, eg:

Framed["yo", FrameStyle -> Blue]


But

Framed["??", FrameStyle -> Thickness[0.1]]


and

Framed["??", FrameStyle -> Directive[Thickness[0.1]]]


seem to have no effect (having varied thickness parameter)

-
I can only confirm that this happens on my PC (Win7-64/MMA8.04) too. The documentation suggests that the above should be possible, though not a single example using Framed, FrameStyle and Thickness together is given. –  Sjoerd C. de Vries Jul 31 '12 at 21:43

It indeed seems that the thickness of the frame doesn't respond to any of the options in Frame. As a workaround, you could do this (although I would recommend the second approach below, instead!):

SetOptions[FrameBox, BoxFrame -> 3];
Framed["AA", FrameStyle -> Red]


However, the SetOptions will affect all frames drawn in your notebook (even ones that have been drawn before).

A more customizable approach would be to use the lower level FrameBox directly. This is shown here - using the ability of BoxFrame to specify thicknesses of all sides individually:

FrameBox["AA", FrameStyle -> Red,
BoxFrame -> {{1, 4}, {1, 1}}] // DisplayForm


Edit: I neglected to add the comment by Mike Honeychurch, according to which it's also possible to get the above output with this line:

Framed["AA", BoxFrame -> {{1, 4}, {1, 1}}, FrameStyle -> Red]


However, the BoxFrame option appears in red because it's not an officially documented option (and therefore this last line may stop working in future versions).

-
+1 Nice little insights ;-) –  Vitaliy Kaurov Jul 31 '12 at 22:47
BoxFrame can be used directly with Framed, so use of lower level boxes can be avoided: Framed["AA", BoxFrame -> {{1, 4}, {1, 1}}, FrameStyle -> Red] –  Mike Honeychurch Jul 31 '12 at 23:32
@MikeHoneychurch Thanks - but I get the red syntax error highlighting, even though it does indeed produce the desired result. I personally would prefer to avoid the red highlighting because it's distracting. –  Jens Aug 1 '12 at 1:33
I've found this sort of syntax highlighting occasionally when doing things that work but are not documented. If it is distracting you can always change the colour. ;) –  Mike Honeychurch Aug 1 '12 at 1:40