System.Windows.Forms.DomainUpDown.OnTextBoxKeyPress Method

Raises the Control.KeyPress event.

Syntax

protected override void OnTextBoxKeyPress (object source, KeyPressEventArgs e)

Parameters

source
The source of the event.
e
A System.Windows.Forms.KeyPressEventArgs that contains the event data.

Remarks

If the UpDownBase.ReadOnly property is set to true, the System.Windows.Forms.DomainUpDown control chooses the item on the list that begins with the character. If more than one item in the collection starts with the same character, the System.Windows.Forms.DomainUpDown control selects the next item that begins with the typed character, starting from the currently selected position.

Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

The DomainUpDown.OnTextBoxKeyPress(object, KeyPressEventArgs) method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0