OnFocus (NotesUIView - LotusScript®)
Occurs when the subwindow displaying the view receives a focus notification.
Defined in
Syntax
OnFocus(Source As Notesuiview)
Parameters
Source
NotesUIView. Read-only. The current embedded view.
Usage
In the case of a view embedded in a form, the embedded view is treated as a separate subwindow. The view onfocus event code does not execute if the containing form receives focus. The view onfocus event code executes only if the embedded view itself receives focus. Note that when the embedded view receives focus, the containing form loses focus, and when the containing form receives focus, the embedded view loses focus.
Using any LotusScript® in the onfocus event that changes focus to other views, forms, or subforms will cause the focus events in those subwindows to execute. First, the currently executing onfocus event code will run to completion, then the onblur code in the current subwindow and the onfocus/onblur code in other affected subwindows will execute. All onfocus/onblur events are queued and held until all current code is finished executing. If multiple onfocus/onblur events are queued for the same subwindow, onfocus will only execute once, and onblur will execute once if the subwindow no longer has focus once onfocus is done executing.
In the case of a form with subforms, all onfocus and onblur events are considered to be a single unit. Either all of them are executed, or none of them are executed.