XmlMappedRange.HorizontalAlignment プロパティ
XmlMappedRange コントロールの水平方向の配置を取得または設定します。
名前空間: Microsoft.Office.Tools.Excel
アセンブリ: Microsoft.Office.Tools.Excel (Microsoft.Office.Tools.Excel.dll 内)
構文
'宣言
Property HorizontalAlignment As Object
Get
Set
Object HorizontalAlignment { get; set; }
プロパティ値
型: System.Object
いずれかの XlHAlign 値を返します。
解説
選択またはインストールされている言語サポート (英語 (U.S.)) によっては、XlHAlign定数の一部を使用できない場合があります 使用できない場合があります。
例
次のコード例では、HorizontalAlignment プロパティおよび VerticalAlignment プロパティを使用して、XmlMappedRange の内容を右下に配置します。 このコード例では、現在のワークシートに CustomerLastNameCell という名前の XmlMappedRange が含まれているものと仮定しています。
Private Sub AlignBottomRight()
Me.CustomerLastNameCell.HorizontalAlignment = _
Excel.XlHAlign.xlHAlignRight
Me.CustomerLastNameCell.VerticalAlignment = _
Excel.XlVAlign.xlVAlignBottom
Me.CustomerLastNameCell.Value2 = "The contents " & _
"of this cell are aligned to the bottom right."
Me.CustomerLastNameCell.RowHeight = 100
Me.CustomerLastNameCell.ColumnWidth = 75
End Sub
private void AlignBottomRight()
{
this.CustomerLastNameCell.HorizontalAlignment =
Excel.XlHAlign.xlHAlignRight;
this.CustomerLastNameCell.VerticalAlignment =
Excel.XlVAlign.xlVAlignBottom;
this.CustomerLastNameCell.Value2 = "The contents " +
"of this cell are aligned to the bottom right.";
this.CustomerLastNameCell.RowHeight = 100;
this.CustomerLastNameCell.ColumnWidth = 75;
}
.NET Framework セキュリティ
- 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。