GrapeCity SPREAD for Windows Forms 11.0J
TextAlign プロパティ (ButtonCellType)


ボタン画像に対するテキストの配置を取得または設定します。
構文
'Declaration
 
Public Property TextAlign As ButtonTextAlign
'使用法
 
Dim instance As ButtonCellType
Dim value As ButtonTextAlign
 
instance.TextAlign = value
 
value = instance.TextAlign
public ButtonTextAlign TextAlign {get; set;}

プロパティ値

テキストの配置を決定するButtonTextAlign設定
次のサンプルコードは、最初のシートのセルを2値式ボタン型セルとして設定し(したがって、ユーザーがセルをクリックするたびにセルの状態が切り替わる)、一方の状態のときにPicture画像を表示し、もう一方の状態のときにPictureDown画像を表示します。ボタンの画像の上にテキストが表示されます。
FarPoint.Win.Spread.CellType.ButtonCellType butncell = new FarPoint.Win.Spread.CellType.ButtonCellType();
butncell.TwoState = true;
Image upimage;
Image dnimage;
upimage = Image.FromFile("..\\images\\up.jpg");
dnimage = Image.FromFile("..\\images\\down.jpg");
butncell.Picture = upimage;
butncell.PictureDown = dnimage;
butncell.TextAlign = FarPoint.Win.ButtonTextAlign.TextTopPictBottom;
butncell.Text = "Now up - Click";
butncell.TextDown ="Now down - Click";
fpSpread1.Sheets[0].Cells[4,2].CellType = butncell;
Dim butncell As New FarPoint.Win.Spread.CellType.ButtonCellType()
butncell.TwoState = True
Dim upimage As Image
Dim dnimage As Image
butncell.Picture = upimage.FromFile("..\images\up.jpg")
butncell.PictureDown = dnimage.FromFile("..\images\down.jpg")
butncell.TextAlign = FarPoint.Win.ButtonTextAlign.TextTopPictBottom
butncell.Text = "Now up - Click"
butncell.TextDown ="Now down - Click"
fpSpread1.Sheets(0).Cells(4,2).CellType = butncell
参照

ButtonCellType クラス
ButtonCellType メンバ

 

 


© 2004-2018, GrapeCity Inc. All rights reserved.