Garry's Mod Wiki

Garry's Mod Wiki

  DTextEntry:OnEnter( string value )

Description

Called whenever enter is pressed on a DTextEntry.

DTextEntry:IsEditing will still return true in this callback!

Arguments

1 string value
The current text of the DTextEntry

Example

local TextEntry = vgui.Create( "DTextEntry" ) function TextEntry:OnEnter( value ) print("You typed: ", value) end

Example

local TextEntry = vgui.Create( "DTextEntry" ) TextEntry.OnEnter = function( self ) -- Alternative method, outputs DTextEntry object. print("You typed: ", self:GetValue()) -- Use self:GetValue() to grab the string. end
Output: Whatever string was typed into the DTextEntry appears in console when enter is pressed.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...