Wimark.Controls Class Library  

UpDownBase.OnValidateKey Method

When overridden in a derived class, validates new characters in the up-down control.

[Visual Basic]
Overridable Protected Function OnValidateKey( _
   ByVal key As Char _
) As Boolean 
[C#]
protected virtual bool OnValidateKey( 
   char key 
);
[C++]
protected: virtual bool OnValidateKey( 
   __wchar_t key 
);

Return Value

A value indicating whether the new character is accepted.

Remarks

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

The OnValidateKey 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.

Notes to Inheritors:  When overriding OnValidateKey in a derived class, be sure to call the base class's OnValidateKey method so that registered delegates receive the event.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

See Also

UpDownBase Class | UpDownBase Members | Wimark.Controls Namespace