HeaderPane
Main
Hide
Share Link
Print

ValueChanged Event, SftMask Class

Occurs when the value of the first numeric field changes.

Class: SftMask
Namespace: Softelvdm.SftMaskNET
Assembly: Softelvdm.SftMaskNET

Syntax

public event EventHandler ValueChanged;
Public Event ValueChanged As EventHandler

Comments

Occurs when the value of the first numeric field changes.

Examples

C# View entire sample code

        // sftMask1 - an amount with up and down buttons; typing +, -, * or / opens the calculator

        private void sftMask1_TextChanged(object sender, EventArgs e) {
            DumpValues("sftMask1.TextChanged (" + sftMask1.Text + ")", e);
        }

        private void sftMask1_ValueChanged(object sender, EventArgs e) {
            DumpValues("sftMask1.ValueChanged (" + (sftMask1.Value.HasValue ? sftMask1.Value.Value.ToString() : "none") + ")", e);
        }

        private void sftMask1_InputRejected(object sender, InputRejectedEventArgs e) {
            DumpValues("sftMask1.InputRejected", e);
        }

        private void sftMask1_ValidationError(object sender, ValidationErrorEventArgs e) {
            DumpValues("sftMask1.ValidationError", e);

VB.NET View entire sample code

    End Sub

    ' SftMask1 - an amount with up and down buttons; typing +, -, * or / opens the calculator

    Private Sub SftMask1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles SftMask1.TextChanged
        DumpValues("SftMask1.TextChanged (" + SftMask1.Text + ")", e)
    End Sub

    Private Sub SftMask1_ValueChanged(ByVal sender As Object, ByVal e As EventArgs) Handles SftMask1.ValueChanged
        Dim value As String = "none"
        If SftMask1.Value.HasValue Then
            value = SftMask1.Value.Value.ToString()
        End If
        DumpValues("SftMask1.ValueChanged (" + value + ")", e)
    End Sub

See Also SftMask Class | Classes | SftMask/NET 3.0