Garry's Mod Wiki

PANEL:OnFocusChanged

  PANEL:OnFocusChanged( boolean gained )

Description

Called whenever the panel gained or lost focus.

Panel:HasFocus will only be updated on the next frame and will return the "old" value at the time this hook is run. Same goes for vgui.GetKeyboardFocus.

Arguments

1 boolean gained
If the focus was gained (true) or lost (false).