Provides data for the SftMask.UpDownPress event.
An event handler can set UpDownPressEventArgs.FieldText to the field's new text, or set Handled to keep the control from stepping the field (SftMask.SpinIncrement and SftMask.SpinAccelerations properties).
Namespace: Softelvdm.SftMaskNET
Assembly: Softelvdm.SftMaskNET
Inheritance
public class UpDownPressEventArgs : System.EventArgs;
Public Class UpDownPressEventArgs
Inherits System.EventArgsThis class cannot be instantiated.
![]() | Counter | Returns how often the event was raised while the button or key is held down; 0 for the first time. |
![]() | FieldEnd | Returns the position following the numeric field. |
![]() | FieldStart | Returns the first position of the numeric field. |
![]() | FieldText | Defines the text of the numeric field. |
![]() | Handled | Defines whether the application handled the press; the control's own step is then not used. |
![]() | Up | Returns whether the field is increased (the up button, the Up key or the SftMask.SpinUp method). |
![]() ![]() ![]() | Empty | Provides a value to use with events that do not have event data. |
![]() ![]() | Equals | Determines whether the specified object is equal to the current object. |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. |
![]() ![]() | GetHashCode | Serves as the default hash function. |
![]() ![]() | GetType | Gets the Type of the current instance. |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. |
![]() ![]() ![]() | ReferenceEquals | Determines whether the specified Object instances are the same instance. |
![]() ![]() | ToString | Returns a string that represents the current object. |
}
// Amounts over 10,000 are not accepted.
private void sftMask1_CustomValidation(object sender, CancelEventArgs e) {
e.Cancel = sftMask1.Value.HasValue && sftMask1.Value.Value > 10000;
DumpValues("sftMask1.CustomValidation" + (e.Cancel ? " (over 10,000, refused)" : ""), e);
}
private void sftMask1_UpDownPress(object sender, UpDownPressEventArgs e) {
DumpValues("sftMask1.UpDownPress", e);
}
private void sftMask1_CalculatorOpening(object sender, CalculatorOpeningEventArgs e) {
e.Cancel = checkBlock.Checked;
DumpValues("sftMask1.CalculatorOpening" + (e.Cancel ? " (canceled)" : ""), e);
}
End Sub
' Amounts over 10,000 are not accepted.
Private Sub SftMask1_CustomValidation(ByVal sender As Object, ByVal e As CancelEventArgs) Handles SftMask1.CustomValidation
e.Cancel = SftMask1.Value.HasValue AndAlso SftMask1.Value.Value > 10000
DumpValues("SftMask1.CustomValidation" + If(e.Cancel, " (over 10,000, refused)", ""), e)
End Sub
Private Sub SftMask1_UpDownPress(ByVal sender As Object, ByVal e As UpDownPressEventArgs) Handles SftMask1.UpDownPress
DumpValues("SftMask1.UpDownPress", e)
End Sub
Private Sub SftMask1_CalculatorOpening(ByVal sender As Object, ByVal e As CalculatorOpeningEventArgs) Handles SftMask1.CalculatorOpening
e.Cancel = CheckBlock.Checked
DumpValues("SftMask1.CalculatorOpening" + If(e.Cancel, " (canceled)", ""), e)
End SubSee Also Classes | SftMask/NET 3.0