local TextEntry =vgui.Create( "DTextEntry" )
functionTextEntry: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.