Garry's Mod Wiki

DTextEntry:SetEnterAllowed

  DTextEntry:SetEnterAllowed( boolean allowEnter )

Description

Sets whether pressing the Enter key will cause the DTextEntry to lose focus or not, provided it is not multiline. This is true by default.

Arguments

1 boolean allowEnter
If set to false, pressing Enter will not cause the panel to lose focus and will never call DTextEntry:OnEnter.