// Please use the following namespace
// using System.Windows.Forms;
// using GrapeCity.Win.Editors;
public void SetSidButtonSettings()
{
// Creates an instance of a GcMask control.
GcMask gcMask1 = new GcMask();
// Creates the SpinButton.
SpinButton spinButton = new SpinButton();
// Creates some fields.
GrapeCity.Win.Editors.Fields.MaskLiteralField maskLiteralField1 = new GrapeCity.Win.Editors.Fields.MaskLiteralField();
GrapeCity.Win.Editors.Fields.MaskLiteralField maskLiteralField2 = new GrapeCity.Win.Editors.Fields.MaskLiteralField();
GrapeCity.Win.Editors.Fields.MaskEnumerationField maskEnumerationField1 = new GrapeCity.Win.Editors.Fields.MaskEnumerationField();
// Sets the settings about fields.
maskLiteralField1.Text = "Contact Us:";
maskLiteralField2.Text = " Info@";
maskEnumerationField1.Items = new string[] {
"GrapeCity.com",
"GrapeCity.com.cn",
"GrapeCity.com.jp"};
// Adds fields.
gcMask1.Fields.AddRange(new GrapeCity.Win.Editors.Fields.MaskField[] {
maskLiteralField1,
maskLiteralField2,
maskEnumerationField1});
// Adds the spinButton.
gcMask1.SideButtons.AddRange(new GrapeCity.Win.Editors.SideButtonBase[] {spinButton});
}
' Please use the following namespace
' Imports System.Windows.Forms;
' Imports GrapeCity.Win.Editors;
Public Sub SetSidButtonSettings()
' Creates an instance of a GcMask control.
Dim gcMask1 As New GcMask()
' Creates the SpinButton.
Dim spinButton As New SpinButton()
' Creates some fields.
Dim maskLiteralField1 As New GrapeCity.Win.Editors.Fields.MaskLiteralField()
Dim maskLiteralField2 As New GrapeCity.Win.Editors.Fields.MaskLiteralField()
Dim maskEnumerationField1 As New GrapeCity.Win.Editors.Fields.MaskEnumerationField()
' Sets the settings about fields.
maskLiteralField1.Text = "Contact Us:"
maskLiteralField2.Text = " Info@"
maskEnumerationField1.Items = New String() {"GrapeCity.com", "GrapeCity.com.cn", "GrapeCity.com.jp"}
' Adds fields.
gcMask1.Fields.AddRange(New GrapeCity.Win.Editors.Fields.MaskField() {maskLiteralField1, maskLiteralField2, maskEnumerationField1})
' Adds the spinButton.
gcMask1.SideButtons.AddRange(New GrapeCity.Win.Editors.SideButtonBase() {spinButton})
End Sub