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


ボタンのハイライト色を取得または設定します。
構文
'Declaration
 
Public Property LightColor As Color
'使用法
 
Dim instance As ButtonCellType
Dim value As Color
 
instance.LightColor = value
 
value = instance.LightColor
public Color LightColor {get; set;}

プロパティ値

ボタンの明色を含む Color オブジェクト
解説
異なるボタン色を表示するには、UseVisualStyleBackColorプロパティをfalseに設定します。
次のサンプルコードは、最初のシートのセルをボタン型セルとして設定し、ボタンの下辺と右辺の色(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 メンバ

 

 


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