' Please use the following namespace
' Imports System.Windows.Forms;
' Imports GrapeCity.Win.Editors;
' Imports Fields;
' Creates an instance of a GcMaskedComboBox control.
Private gcMaskedComboBox1 As New GcMaskedComboBox()
Public Sub SetSideButtons()
' Defines SymbolButtons.
Dim symbolButton1 As New SymbolButton()
Dim symbolButton2 As New SymbolButton()
symbolButton1.Name = "symbolButton1"
symbolButton1.Position = ButtonPosition.LeftOutside
symbolButton1.Symbol = Symbols.Arrow
symbolButton1.SymbolDirection = SymbolDirection.Up
symbolButton1.UseVisualStyleBackColor = True
AddHandler symbolButton1.Click, AddressOf OnSymbolButton1Click
symbolButton2.Name = "symbolButton2"
symbolButton2.Position = ButtonPosition.RightOutside
symbolButton2.Symbol = Symbols.Arrow
symbolButton2.SymbolDirection = SymbolDirection.Down
AddHandler symbolButton2.Click, AddressOf OnSymbolButton2Click
' Adds SymbolButtons to the SideButtons collection.
gcMaskedComboBox1.SideButtons.AddRange(New SideButtonBase() {symbolButton1, symbolButton2})
End Sub
Private Sub OnSymbolButton2Click(ByVal sender As Object, ByVal e As EventArgs)
' Spin the GcMaskedComboBox value to the less one.
gcMaskedComboBox1.DoSpinDown()
End Sub
Private Sub OnSymbolButton1Click(ByVal sender As Object, ByVal e As EventArgs)
' Spin the GcMaskedComboBox value to the greater one.
gcMaskedComboBox1.DoSpinUp()
End Sub
// Please use the following namespace
// using System.Windows.Forms;
// using GrapeCity.Win.Editors;
// using Fields;
// Creates an instance of a GcMaskedComboBox control.
GcMaskedComboBox gcMaskedComboBox1 = new GcMaskedComboBox();
public void SetSideButtons()
{
// Defines SymbolButtons.
SymbolButton symbolButton1 = new SymbolButton();
SymbolButton symbolButton2 = new SymbolButton();
symbolButton1.Name = "symbolButton1";
symbolButton1.Position = ButtonPosition.LeftOutside;
symbolButton1.Symbol = Symbols.Arrow;
symbolButton1.SymbolDirection = SymbolDirection.Up;
symbolButton1.UseVisualStyleBackColor = true;
symbolButton1.Click += new EventHandler(OnSymbolButton1Click);
symbolButton2.Name = "symbolButton2";
symbolButton2.Position = ButtonPosition.RightOutside;
symbolButton2.Symbol = Symbols.Arrow;
symbolButton2.SymbolDirection = SymbolDirection.Down;
symbolButton2.Click += new EventHandler(OnSymbolButton2Click);
// Adds SymbolButtons to the SideButtons collection.
gcMaskedComboBox1.SideButtons.AddRange(new SideButtonBase[] {
symbolButton1,
symbolButton2});
}
private void OnSymbolButton2Click(object sender, EventArgs e)
{
// Spin the GcMaskedComboBox value to the less one.
gcMaskedComboBox1.DoSpinDown();
}
private void OnSymbolButton1Click(object sender, EventArgs e)
{
// Spin the GcMaskedComboBox value to the greater one.
gcMaskedComboBox1.DoSpinUp();
}