作成日: 2017/02/15 最終更新日: 2017/02/15
文書種別
使用方法
詳細
GcNumber型セルにて提供されている電卓では、キーボード操作で電卓を操作([Enter]キーにて確定、[Delete]キーによるクリアなど)することができます。
◎サンプルコード(VB)
◎サンプルコード(C#)
◎サンプルコード(VB)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' GcNumber型セルの設定
Dim gcNumberCell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType()
' 電卓のボタンのテキストを変更
gcNumberCell1.DropDownCalculator.ButtonText.Add("*", "×")
' 電卓のスタイルを変更
Dim colorBC As Color = Color.Blue
Dim colorFC As Color = Color.Red
Dim newTE As GrapeCity.Win.Spread.InputMan.CellType.TextEffect = GrapeCity.Win.Spread.InputMan.CellType.TextEffect.Inset
gcNumberCell1.DropDownCalculator.MathButtons = New GrapeCity.Win.Spread.InputMan.CellType.CalculatorButtonStyleInfo(colorFC, colorBC, newTE)
gcNumberCell1.DropDownCalculator.FlatStyle = FlatStyle.Flat
FpSpread1.ActiveSheet.Columns(0).CellType = gcNumberCell1
End Sub
' GcNumber型セルの設定
Dim gcNumberCell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType()
' 電卓のボタンのテキストを変更
gcNumberCell1.DropDownCalculator.ButtonText.Add("*", "×")
' 電卓のスタイルを変更
Dim colorBC As Color = Color.Blue
Dim colorFC As Color = Color.Red
Dim newTE As GrapeCity.Win.Spread.InputMan.CellType.TextEffect = GrapeCity.Win.Spread.InputMan.CellType.TextEffect.Inset
gcNumberCell1.DropDownCalculator.MathButtons = New GrapeCity.Win.Spread.InputMan.CellType.CalculatorButtonStyleInfo(colorFC, colorBC, newTE)
gcNumberCell1.DropDownCalculator.FlatStyle = FlatStyle.Flat
FpSpread1.ActiveSheet.Columns(0).CellType = gcNumberCell1
End Sub
◎サンプルコード(C#)
private void Form1_Load(object sender, EventArgs e)
{
// GcNumber型セルの設定
GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType gcNumberCell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType();
// 電卓のボタンのテキストを変更
gcNumberCell1.DropDownCalculator.ButtonText.Add("*", "×");
// 電卓のスタイルを変更
Color colorBC = Color.Blue;
Color colorFC = Color.Red;
GrapeCity.Win.Spread.InputMan.CellType.TextEffect newTE = GrapeCity.Win.Spread.InputMan.CellType.TextEffect.Inset;
gcNumberCell1.DropDownCalculator.MathButtons = new GrapeCity.Win.Spread.InputMan.CellType.CalculatorButtonStyleInfo(colorFC, colorBC, newTE);
gcNumberCell1.DropDownCalculator.FlatStyle = FlatStyle.Flat;
fpSpread1.ActiveSheet.Columns[0].CellType = gcNumberCell1;
}
{
// GcNumber型セルの設定
GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType gcNumberCell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType();
// 電卓のボタンのテキストを変更
gcNumberCell1.DropDownCalculator.ButtonText.Add("*", "×");
// 電卓のスタイルを変更
Color colorBC = Color.Blue;
Color colorFC = Color.Red;
GrapeCity.Win.Spread.InputMan.CellType.TextEffect newTE = GrapeCity.Win.Spread.InputMan.CellType.TextEffect.Inset;
gcNumberCell1.DropDownCalculator.MathButtons = new GrapeCity.Win.Spread.InputMan.CellType.CalculatorButtonStyleInfo(colorFC, colorBC, newTE);
gcNumberCell1.DropDownCalculator.FlatStyle = FlatStyle.Flat;
fpSpread1.ActiveSheet.Columns[0].CellType = gcNumberCell1;
}
旧文書番号
39958