Raises the Control.KeyPress event.
- source
- The source of the event.
- e
- A System.Windows.Forms.KeyPressEventArgs that contains the event data.
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.