C# Class ZForge.Controls.TreeViewAdv.NumericTextBox

Restricts the entry of characters to digits, the negative sign, the decimal point, and editing keystrokes (backspace). It does not handle the AltGr key so any keys that can be created in any combination with AltGr these are not filtered
Inheritance: System.Windows.Forms.TextBox
Afficher le fichier Open project: zhuangyy/Motion

Private Properties

Свойство Type Description
invalidNumeric bool

Méthodes protégées

Méthode Description
OnKeyPress ( KeyPressEventArgs e ) : void

Restricts the entry of characters to digits, the negative sign, the decimal point, and editing keystrokes (backspace). It does not handle the AltGr key

WndProc ( Message &m ) : void

Method invoked when Windows sends a message.

This is over-ridden so that the user can not use cut or paste operations to bypass the TextChanging event. This catches ContextMenu Paste, Shift+Insert, Ctrl+V, While it is generally frowned upon to override WndProc, no other simple mechanism was apparent to simultaneously and transparently intercept so many different operations.

Private Methods

Méthode Description
invalidNumeric ( char key ) : bool

Main method for verifying allowed keypresses. This does not catch cut paste copy ... operations.

Method Details

OnKeyPress() protected méthode

Restricts the entry of characters to digits, the negative sign, the decimal point, and editing keystrokes (backspace). It does not handle the AltGr key
protected OnKeyPress ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs
Résultat void

WndProc() protected méthode

Method invoked when Windows sends a message.
This is over-ridden so that the user can not use cut or paste operations to bypass the TextChanging event. This catches ContextMenu Paste, Shift+Insert, Ctrl+V, While it is generally frowned upon to override WndProc, no other simple mechanism was apparent to simultaneously and transparently intercept so many different operations.
protected WndProc ( Message &m ) : void
m Message Message from Windows.
Résultat void