GrapeCity SPREAD for Windows Forms 11.0J
SideButtons プロパティ (GcNumberCellType)


コントロールに設定されているサイドボタンのコレクションを取得します。
構文
'Declaration
 
Public Property SideButtons As SideButtonCollectionInfo
'使用法
 
Dim instance As GcNumberCellType
Dim value As SideButtonCollectionInfo
 
instance.SideButtons = value
 
value = instance.SideButtons
public SideButtonCollectionInfo SideButtons {get; set;}

プロパティ値

コレクションを示す SideButtonCollection 値。
解説
SideButtonsは追加または削除できます。これにはDropDownButtonSpinButtonSideButtonSymbolButtonが含まれます。
次のサンプルコードは、値を増減するためのサイドボタンを作成します。
GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo testbutton = new GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo();
testbutton.Behavior = GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinDown;
testbutton.BackColor = Color.Red;
testbutton.UseVisualStyleBackColor = false;
GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo testbutton1 = new GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo();
testbutton1.BackColor = Color.Green;
testbutton1.UseVisualStyleBackColor = false;
testbutton1.Behavior = GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinUp;
GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType ncell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType();
//Clears other buttons including the calculator button
ncell1.SideButtons.Clear();
ncell1.SideButtons.Add(testbutton);
ncell1.SideButtons.Add(testbutton1);
ncell1.Spin.AllowSpin = true;
ncell1.Spin.IncrementValue = 1;           
ncell1.Spin.SpinMode = GrapeCity.Win.Spread.InputMan.CellType.NumberSpinMode.Value;          
fpSpread1.Sheets[0].Cells[1, 1].CellType = ncell1;
fpSpread1.ActiveSheet.Cells[1, 1].Value = 12.31;
Dim testbutton As New GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo()
testbutton.Behavior = GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinDown
testbutton.BackColor = Color.Red
testbutton.UseVisualStyleBackColor = False
Dim testbutton1 As New GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo()
testbutton1.BackColor = Color.Green
testbutton1.UseVisualStyleBackColor = False
testbutton1.Behavior = GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinUp
Dim ncell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType()
'Clears other buttons including the calculator button
ncell1.SideButtons.Clear()
ncell1.SideButtons.Add(testbutton)
ncell1.SideButtons.Add(testbutton1)
ncell1.Spin.AllowSpin = True
ncell1.Spin.IncrementValue = 1
ncell1.Spin.SpinMode = GrapeCity.Win.Spread.InputMan.CellType.NumberSpinMode.Value
FpSpread1.Sheets(0).Cells(1, 1).CellType = ncell1
FpSpread1.ActiveSheet.Cells(1, 1).Value = 12.31
参照

GcNumberCellType クラス
GcNumberCellType メンバ

 

 


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