PowerTools SPREAD for Windows Forms 8.0J
TextDown プロパティ (ButtonCellType)


ボタンを押した状態のテキストを取得または設定します。
構文
'Declaration
 
Public Property TextDown As String
'使用法
 
Dim instance As ButtonCellType
Dim value As String
 
instance.TextDown = value
 
value = instance.TextDown
public string TextDown {get; set;}

プロパティ値

ボタンが押されたときに表示するテキストを含む String
解説

これはボタンが押されたときに表示されるテキストです。ボタンが1値式の場合は一瞬だけしか表示されませんが、2値式ボタンの場合は、ボタンがもう一度押されてもう一方の状態に戻るまで表示されます。

次のサンプルコードは、最初のシートのセルをボタン型セルとして設定し、ボタンの下辺と右辺の色(DarkColor)、上辺と左辺の色(LightColor)、影、およびテキストを指定します。また、ボタンが押されたとき(押された状態が維持されたとき)に異なるテキストを表示する方法と、テキストを複数行に折り返す方法も示しています。
FarPoint.Win.Spread.CellType.ButtonCellType bttncell = new FarPoint.Win.Spread.CellType.ButtonCellType();
bttncell.ButtonColor = Color.Cyan;
bttncell.DarkColor = Color.DarkCyan;
bttncell.LightColor = Color.AliceBlue;
bttncell.ShadowSize = 3;
bttncell.Text = "Click and hold...";
bttncell.TextDown = "...you can see how words go to multiple lines. Now let go.";
bttncell.TextColor = Color.Green;
bttncell.WordWrap = true;
bttncell.UseVisualStyleBackColor = false;
fpSpread1.Sheets[0].Cells[3,2].CellType = bttncell;
Dim bttncell As New FarPoint.Win.Spread.CellType.ButtonCellType()
bttncell.ButtonColor = Color.Cyan
bttncell.DarkColor = Color.DarkCyan
bttncell.LightColor = Color.AliceBlue
bttncell.ShadowSize = 3
bttncell.Text = "Click and hold..."
bttncell.TextDown = "...you can see how words go to multiple lines. Now let go."
bttncell.TextColor = Color.Green
bttncell.WordWrap = True
bttncell.UseVisualStyleBackColor = False
fpSpread1.Sheets(0).Cells(3,2).CellType = bttncell
参照

ButtonCellType クラス
ButtonCellType メンバ
Text プロパティ

 

 


© 2004-2015, GrapeCity inc. All rights reserved.