我的实际跑出来的效果是这样的,不能输入内容,下边是这个控件的代码。
MaskPatternField1.MaxLength = 2
MaskPatternField1.MinLength = 2
MaskPatternField1.Pattern = "\\D"
MaskLiteralField1.Text = "-"
MaskPatternField2.MaxLength = 2
MaskPatternField2.MinLength = 2
MaskPatternField2.Pattern = "\\D"
Me.決済日.Fields.Add(MaskPatternField1)
Me.決済日.Fields.Add(MaskLiteralField1)
Me.決済日.Fields.Add(MaskPatternField2)
Me.決済日.Location = New System.Drawing.Point(724, 20)
Me.決済日.Name = "決済日"
Me.決済日.ShortcutKeys.AddRange(New GrapeCity.Win.MultiRow.InputMan.ShortcutDictionaryEntry() {New GrapeCity.Win.MultiRow.InputMan.ShortcutDictionaryEntry(System.Windows.Forms.Keys.F2, "ShortcutClear"), New GrapeCity.Win.MultiRow.InputMan.ShortcutDictionaryEntry(CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.[Return]), System.Windows.Forms.Keys), "ApplyRecommendedValue")})
Me.決済日.Size = New System.Drawing.Size(89, 20)
CellStyle21.BackColor = System.Drawing.Color.LightYellow
Border22.Bottom = New GrapeCity.Win.MultiRow.Line(GrapeCity.Win.MultiRow.LineStyle.Thin, System.Drawing.Color.Black)
Border22.Left = New GrapeCity.Win.MultiRow.Line(GrapeCity.Win.MultiRow.LineStyle.Thin, System.Drawing.Color.LightGray)
Border22.Right = New GrapeCity.Win.MultiRow.Line(GrapeCity.Win.MultiRow.LineStyle.Thin, System.Drawing.Color.LightGray)
Border22.Top = New GrapeCity.Win.MultiRow.Line(GrapeCity.Win.MultiRow.LineStyle.Thin, System.Drawing.Color.LightGray)
CellStyle21.Border = Border22
CellStyle21.DisabledForeColor = System.Drawing.SystemColors.GrayText
CellStyle21.Font = New System.Drawing.Font("MS ゴシック", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
CellStyle21.ForeColor = System.Drawing.SystemColors.WindowText
CellStyle21.ImeMode = System.Windows.Forms.ImeMode.NoControl
CellStyle21.ImeSentenceMode = GrapeCity.Win.MultiRow.ImeSentenceMode.Normal
CellStyle21.TextAlign = GrapeCity.Win.MultiRow.MultiRowContentAlignment.MiddleCenter
CellStyle21.TextEffect = GrapeCity.Win.MultiRow.TextEffect.Flat
Me.決済日.Style = CellStyle21
Me.決済日.TabIndex = 8
Me.決済日.Value = "210101" |