I figured out that by "tabulator" you were referring to adding a table to the textframe. 2 columns, 1 row. I made cell[0] left aligned and cell[1] right aligned. I added my paragraphs to the cells. They had the appropriate styes. It sort of works, but for two problems.
1. I get a white break in my blue background which needs to span the width the frame (first line only - the rest of the text frame needs to be white)
2. The column properties and the paragraph styles both specify size 8 in cell[0] and size 7 in cell[1], but I wind up with size 8 in cell[1] anyway. It has to be size 7.
Here is the code:
Code:
Style bar = mdoc.Styles["bar"];
bar.Font.Size = 8;
bar.Font.Name = "Arial";
bar.ParagraphFormat.LineSpacing = 9;
bar.ParagraphFormat.LineSpacingRule = LineSpacingRule.Exactly;
bar.Font.Bold = true;
bar.ParagraphFormat.Shading.Color = reportColor;
bar.Font.Color = Colors.White;
Style barr = mdoc.Styles["barr"];
barr.Font.Size = 7;
barr.Font.Name = "Arial";
barr.ParagraphFormat.LineSpacing = 9;
barr.ParagraphFormat.LineSpacingRule = LineSpacingRule.Exactly;
barr.Font.Bold = true;
barr.ParagraphFormat.Shading.Color = reportColor;
barr.Font.Color = Colors.White;
barr.ParagraphFormat.Alignment = ParagraphAlignment.Right;
...
Table table = frame.AddTable();
Column col1 = table.AddColumn();
col1.Format.Alignment = ParagraphAlignment.Left;
col1.Format.Font.Bold = true;
col1.Format.Font.Color = Colors.White;
col1.Format.Font.Name = "Arial";
col1.Format.Font.Size = 8;
col1.Width = "1.3in";
Column col2 = table.AddColumn();
col2.Format.Alignment = ParagraphAlignment.Right;
col2.Format.Font.Bold = true;
col2.Format.Font.Color = Colors.White;
col2.Format.Font.Name = "Arial";
col2.Format.Font.Size = 7;
col2.Width = "1.6in";
Row row = table.AddRow();
par = row.Cells[0].AddParagraph("Physician Information");
par.Style = "bar";
string rm = Y.route + " " + Y.mnemonic;
par = row.Cells[1].AddParagraph(rm);
par.Style = "barr";