TableCell.BackgroundColor
TableCell.BackgroundColor property
背景色を取得または設定します。
public Color BackgroundColor { get; set; }
例
セルの背景色を設定する方法を示します。
// Document クラスのオブジェクトを作成します
Document doc = new Document();
// TableCell クラス オブジェクトを初期化し、テキスト コンテンツを設定します
TableCell cell11 = new TableCell();
cell11.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Small text"));
cell11.BackgroundColor = Color.Coral;
// TableRow クラス オブジェクトを初期化します
TableRow row = new TableRow();
row.AppendChildLast(cell11);
Table table = new Table()
{
IsBordersVisible = true,
Columns = { new TableColumn() { Width = 200 } }
};
table.AppendChildLast(row);
OutlineElement oe = new OutlineElement();
oe.AppendChildLast(table);
Outline o = new Outline();
o.AppendChildLast(oe);
// Page クラス オブジェクトを初期化します
Page page = new Page();
page.AppendChildLast(o);
doc.AppendChildLast(page);
doc.Save(Path.Combine(RunExamples.GetDataDir_Tables(), "SettingCellBackGroundColor.pdf"));
関連項目
- class TableCell
- 名前空間 Aspose.Note
- 組み立て Aspose.Note