I can write a cell with the text alignment on the right:
NotebookWrite[InputNotebook[],
Cell["On the right", "Subsection", TextAlignment -> Right]]
or likewise on the Left
or in the Center
.
As I change the display width of the cell, the alignment behaves as expected. Great.
My request, though, is to place text at the same elevation or line in a SINGLE cell, some of it left justified, some of it center justified, and some of it right justified, which retains the justification as I interactively change the width of the notebook window, and hence of the cell. (This requirement of being on the same line precludes "solutions" that place three separate rows atop each other, each with a separate TextAlignment
.)
This attempt doesn't work (for fairly obvious reasons), but it may clarify what I'm seeking:
NotebookWrite[InputNotebook[],
BoxData[RowBox[
{Cell["make left justified", "Subsection", TextAlignment -> Left],
Cell["make center justified", "Subsection", TextAlignment -> Center],
Cell["make right justified", "Subsection", TextAlignment -> Right]}]]]