MESCIUS SPREAD for Windows Forms 15.0J
GcMaskCellType コンストラクタ()
使用例 

GcMaskCellType クラスの新しいインスタンスを初期化します。
構文
'宣言
 
Public Function New()
public GcMaskCellType()
使用例
次のサンプルコードは、GcMaskセルを作成します。
GrapeCity.Win.Spread.InputMan.CellType.GcMaskCellType gcMask = new GrapeCity.Win.Spread.InputMan.CellType.GcMaskCellType();
gcMask.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;
gcMask.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Filter;
gcMask.AcceptsTabChar = GrapeCity.Win.Spread.InputMan.CellType.TabCharMode.Filter;

gcMask.AlternateText.DisplayNull.ForeColor = Color.Red;
gcMask.AlternateText.DisplayNull.Text = "Display Null";
gcMask.AlternateText.Null.ForeColor = Color.Red;
gcMask.AlternateText.Null.Text = "Null value";

gcMask.AutoConvert = true;

GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo mlf = new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo("{{: ");
mlf.BackColor = Color.Aqua;
mlf.ForeColor = Color.Black;
mlf.Margin = new System.Windows.Forms.Padding(4);
mlf.Name = "MaskLiteralFieldInfo";
mlf.Font = SystemFonts.DefaultFont;

GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskPatternFieldInfo mpf = new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskPatternFieldInfo("\\D{3}\\-\\D{4}", 7, 7);
mpf.AutoConvert = true;
mpf.BackColor = Color.Beige;
mpf.ForeColor = Color.DarkOliveGreen;
mpf.Font = SystemFonts.DefaultFont;
mpf.Name = "MaskPatternFieldInfo";
mpf.Padding = new System.Windows.Forms.Padding(3);
mpf.PasswordChar = '*';
mpf.PromptChar = '|';
mpf.Text = "MaskPatternFieldInfo_Text";
mpf.UseSystemPasswordChar = true;

GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo mlf2 = new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo("}}: ");
mlf2.BackColor = Color.Aqua;
mlf2.ForeColor = Color.Black ;
mlf2.Margin = new System.Windows.Forms.Padding(4);
mlf2.Name = "MaskLiteralFieldInfo2";
mlf2.Font = SystemFonts.DefaultFont;

GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskEnumerationFieldInfo mef = new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskEnumerationFieldInfo(new string[] { "item1", "item2", "item3", "item4" });
mef.AutoConvert = true;
mef.AutoDropDown = true;
mef.BackColor = Color.CadetBlue;
mef.DropDownEnabled = true;
mef.ForeColor = Color.Red;
mef.PromptChar = '|';
mef.SpinIncrement = 1;
mef.Text = "MaskEnumerationFieldInfo";
mef.Font = SystemFonts.DefaultFont;

gcMask.Fields.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskFieldInfo[] { mlf, mpf, mlf2, mef });
gcMask.PaintByControl = true;
gcMask.PromptChar = '#';
gcMask.RecommendedValue = "1234567item1";
gcMask.ShowRecommendedValue = true;

gcMask.SideButtons.Add(new GrapeCity.Win.Spread.InputMan.CellType.SpinButtonInfo());

gcMask.Spin.AllowSpin = true;
gcMask.Spin.Increment = 1;
gcMask.Spin.SpinOnKeys = true;
gcMask.Spin.SpinOnWheel = true;
gcMask.Spin.Wrap = true;

gcMask.UseSpreadDropDownButtonRender = true;

fpSpread1.ActiveSheet.Cells[0, 0].CellType = gcMask;
Dim gcMask As New GrapeCity.Win.Spread.InputMan.CellType.GcMaskCellType()
gcMask.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows
gcMask.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Filter
gcMask.AcceptsTabChar = GrapeCity.Win.Spread.InputMan.CellType.TabCharMode.Filter

gcMask.AlternateText.DisplayNull.ForeColor = Color.Red
gcMask.AlternateText.DisplayNull.Text = "Display Null"
gcMask.AlternateText.Null.ForeColor = Color.Red
gcMask.AlternateText.Null.Text = "Null value"

gcMask.AutoConvert = True

Dim mlf As New GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo("{{: ")
mlf.BackColor = Color.Aqua
mlf.ForeColor = Color.Black
mlf.Margin = New System.Windows.Forms.Padding(4)
mlf.Name = "MaskLiteralFieldInfo"
mlf.Font = SystemFonts.DefaultFont

Dim mpf As New GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskPatternFieldInfo("\D{3}\-\D{4}", 7, 7)
mpf.AutoConvert = True
mpf.BackColor = Color.Beige
mpf.ForeColor = Color.DarkOliveGreen
mpf.Font = SystemFonts.DefaultFont
mpf.Name = "MaskPatternFieldInfo"
mpf.Padding = New System.Windows.Forms.Padding(3)
mpf.PasswordChar = "*"C
mpf.PromptChar = "|"C
mpf.Text = "MaskPatternFieldInfo_Text"
mpf.UseSystemPasswordChar = True

Dim mlf2 As New GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo("}}: ")
mlf2.BackColor = Color.Aqua
mlf2.ForeColor = Color.Black
mlf2.Margin = New System.Windows.Forms.Padding(4)
mlf2.Name = "MaskLiteralFieldInfo2"
mlf2.Font = SystemFonts.DefaultFont

Dim mef As New GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskEnumerationFieldInfo(New String() {"item1", "item2", "item3", "item4"})
mef.AutoConvert = True
mef.AutoDropDown = True
mef.BackColor = Color.CadetBlue
mef.DropDownEnabled = True
mef.ForeColor = Color.Red
mef.PromptChar = "|"C
mef.SpinIncrement = 1
mef.Text = "MaskEnumerationFieldInfo"
mef.Font = SystemFonts.DefaultFont

gcMask.Fields.AddRange(New GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskFieldInfo() {mlf, mpf, mlf2, mef})
gcMask.PaintByControl = True
gcMask.PromptChar = "#"C
gcMask.RecommendedValue = "1234567item1"
gcMask.ShowRecommendedValue = True

gcMask.SideButtons.Add(New GrapeCity.Win.Spread.InputMan.CellType.SpinButtonInfo())

gcMask.Spin.AllowSpin = True
gcMask.Spin.Increment = 1
gcMask.Spin.SpinOnKeys = True
gcMask.Spin.SpinOnWheel = True
gcMask.Spin.Wrap = True

gcMask.UseSpreadDropDownButtonRender = True

FpSpread1.ActiveSheet.Cells(0, 0).CellType = gcMask
参照

GcMaskCellType クラス
GcMaskCellType メンバ
オーバーロード一覧

 

 


© MESCIUS inc. All rights reserved.