Control.OnLostFocus(EventArgs) Metoda
Definicja
protected:
virtual void OnLostFocus(EventArgs ^ e);
protected virtual void OnLostFocus (EventArgs e);
abstract member OnLostFocus : EventArgs -> unit
override this.OnLostFocus : EventArgs -> unit
Protected Overridable Sub OnLostFocus (e As EventArgs)
Parametry
Uwagi
Podnoszenie zdarzenia wywołuje program obsługi zdarzeń przez delegata.Raising an event invokes the event handler through a delegate. Aby uzyskać więcej informacji, zobacz Obsługa iwywoływanie zdarzeń.For more information, see Handling and Raising Events.
OnLostFocusMetoda umożliwia również klasom pochodnym obsłużenia zdarzenia bez dołączania delegata.The OnLostFocus method also allows derived classes to handle the event without attaching a delegate. Jest to preferowana technika obsługi zdarzenia w klasie pochodnej.This is the preferred technique for handling the event in a derived class.
Uwagi dotyczące dziedziczenia
Podczas zastępowania OnLostFocus(EventArgs) klasy pochodnej należy wywołać metodę klasy bazowej, aby OnLostFocus(EventArgs) zarejestrowani delegowani odbierał zdarzenie.When overriding OnLostFocus(EventArgs) in a derived class, be sure to call the base class's OnLostFocus(EventArgs) method so that registered delegates receive the event.