FarPoint.Web.Spread 名前空間 > Appearance クラス : HorizontalAlign プロパティ |
'Declaration
Public Property HorizontalAlign As HorizontalAlign
public HorizontalAlign HorizontalAlign {get; set;}
このプロパティの有効な値は、Microsoft .NET FrameworkリファレンスのHorizontalAlign列挙体にリストされている水平方向の配置設定です。
オブジェクトまたはテキストの垂直方向の配置を指定するには、VerticalAlignプロパティを使用します。
FarPoint.Web.Spread.Appearance appr = New FarPoint.Web.Spread.Appearance();
FarPoint.Web.Spread.Cell acell;
appr.BackColor = Color.Red;
appr.ForeColor = Color.White;
appr.Font.Bold = True;
appr.HorizontalAlign = HorizontalAlign.Right;
appr.VerticalAlign = VerticalAlign.Top;
acell = FpSpread1.Cells[0,0];
acell.BackColor = appr.BackColor;
acell.ForeColor = appr.ForeColor;
acell.Font.Bold = appr.Font.Bold;
acell.HorizontalAlign = appr.HorizontalAlign;
acell.VerticalAlign = appr.VerticalAlign;
FpSpread1.ActiveSheetView.SetValue(0, 0, "Appearance Test");
FpSpread1.Columns[0].Width = 150;
FpSpread1.Rows[0].Height = 60;
Dim appr As New FarPoint.Web.Spread.Appearance() appr.BackColor = Color.Red appr.ForeColor = Color.White appr.Font.Bold = True appr.HorizontalAlign = HorizontalAlign.Right appr.VerticalAlign = VerticalAlign.Top Dim acell As FarPoint.Web.Spread.Cell acell = FpSpread1.Cells(0, 0) acell.BackColor = appr.BackColor acell.ForeColor = appr.ForeColor acell.Font.Bold = appr.Font.Bold acell.HorizontalAlign = appr.HorizontalAlign acell.VerticalAlign = appr.VerticalAlign FpSpread1.ActiveSheetView.SetValue(0, 0, "Appearance Test") FpSpread1.Columns(0).Width = 150 FpSpread1.Rows(0).Height = 60