1

Consider that label, used as value for CellFrameLabel:

label = Cell["example", "Text", FontFamily -> "Arial", FontSize -> 12,
    FontWeight -> "Plain", FontColor -> RGBColor[1., 0., 0.], 
   CellFrame -> False, CellMargins -> {{0, 0}, {0, 0}}, 
   Background -> RGBColor[0.7, 0.9, 1.], CellSize -> {100, 30}, 
   TextAlignment -> Center, CellBaseline -> Center,
   CellFrameMargins -> {{0, 0}, {0, 0}}
   ];

I would like to place "example" in the vertical center of the label's area but I get:

img

Does exist any way to accomplish the aim without nesting a second cell inside the previous one, or using GridBox and counterparts ?

mitochondrial
  • 1,843
  • 10
  • 16

1 Answers1

1

I think that this workaround solves the problem:

Cell[
    BoxData[
        RowBox[
            {RowBox[{"a", "=", "0"}], ";"}
        ]
    ]
, "Input"
, CellDingbat->Cell[
    "example"
    ,"Text"
    ,FontFamily -> "Arial"
    ,FontSize -> 12
    ,FontWeight -> "Plain"
    ,FontColor -> RGBColor[1., 0., 0.]
    ,CellFrame -> False
    ,CellMargins -> {{0, 0}, {0, 0}}
    ,Background -> RGBColor[0.7, 0.9, 1.]
    ,CellSize -> {100, 30}
    ,TextAlignment -> Center
    ,CellBaseline -> Center
    ,CellFrameMargins -> {{0, 0}, {0, 0}}
    ]
]
mitochondrial
  • 1,843
  • 10
  • 16