Focus events
Focus events are fired when a View gains or loses input focus. Accordingly, two events are possible:
Event | Constant | Description |
---|---|---|
"focus-event" | FocusEvent | View receives input focus (becomes active) |
"lost-focus-event" | LostFocusEvent | View loses input focus (becomes inactive) |
The main event data listener has the following format:
func(View).
You can also use a listener in the following format:
func()
You can get lists of listeners for focus events using the functions:
func GetFocusListeners(view View, subviewID ...string) []func(View) func GetLostFocusListeners(view View, subviewID ...string) []func(View)