Garry's Mod Wiki

Revision Difference

DTextEntry:OnEnter#515163

<function name="OnEnter" parent="DTextEntry" type="panelfunc">⤶ <ispanel>yes</ispanel>⤶ <description>⤶ Called whenever enter is pressed on a DTextEntry.⤶ ⤶ <note><page>DTextEntry:IsEditing</page> will still return true in this callback!</note>⤶ </description>⤶ <realm>Client</realm>⤶ </function>⤶ ⤶ <example>⤶ <code>⤶ local TextEntry = vgui.Create( "DTextEntry" )⤶ TextEntry:SetTextColor( Color( 255, 0, 0, 255 ) )⤶ ⤶ TextEntry.OnEnter = function()⤶ TextEntry:SetTextColor( Color( 0, 0, 255, 255 ) )⤶ end⤶ </code>⤶ <output>Changes the text color when enter is pressed.</output>⤶ ⤶ </example>