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
Mostrar archivo Open project: zhuangyy/Motion

Private Properties

Property Type Description
invalidNumeric bool

Protected Methods

Method 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

Method Description
invalidNumeric ( char key ) : bool

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

Method Details

OnKeyPress() protected method

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
return void

WndProc() protected method

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.
return void