// Please use the following namespace
// using System.Windows.Forms;
// using GrapeCity.Win.Editors;
private Label label1 = new Label();
public void WireEditStatusChangedEvent()
{
GcTextBox gcTextBox1 = new GcTextBox();
gcTextBox1.EditStatusChanged += new EventHandler<EditStatusChangedEventArgs>(OnTextBoxEditStatusChanged);
}
private void OnTextBoxEditStatusChanged(object sender, EditStatusChangedEventArgs e)
{
GcTextBox gcTextBox1 = (sender as GcTextBox);
// The label1 retrieves the insert status.
if (e.Overwrite)
{
label1.Text = "Overwrite";
}
else
{
label1.Text = "Insert";
}
}
' Please use the following namespace
' Imports System.Windows.Forms;
' Imports GrapeCity.Win.Editors;
Private label1 As New Label()
Public Sub WireEditStatusChangedEvent()
Dim gcTextBox1 As New GcTextBox()
AddHandler gcTextBox1.EditStatusChanged, AddressOf OnTextBoxEditStatusChanged
End Sub
Private Sub OnTextBoxEditStatusChanged(ByVal sender As Object, ByVal e As EditStatusChangedEventArgs)
Dim gcTextBox1 As GcTextBox = TryCast(sender, GcTextBox)
' The label1 retrieves the insert status.
If e.Overwrite Then
label1.Text = "Overwrite"
Else
label1.Text = "Insert"
End If
End Sub