Panel.KillFocus

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:KillFocus( )
Description:
Removes keyboard focus from the panel.
Returns: nil
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.KillFocus]Panel.KillFocus [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionIf the panel p has the focus, then it remove the focus. If it doesn't have the focus, it requests it.
Used onNewerClient.png
Code
// P = a Panel object
if (P:HasFocus()) then
    Msg("P has the focus!\n")
    P:KillFocus()
else
   Msg("Requesting focus!\n")
   P:RequestFocus()
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox