DTextEntry/OnEnter

From Garry's Mod
Jump to: navigation, search
 DTextEntry:OnEnter( )

DescriptionPanelHook

Called whenever enter is pressed on a DTextEntry.

NOTE

DTextEntry:IsEditing will still return true in this callback!

Examples

Example

local TextEntry = vgui.Create( "DTextEntry" )
TextEntry:SetTextColor( Color( 255, 0, 0, 255 ) )

TextEntry.OnEnter = function()
    TextEntry:SetTextColor( Color( 0, 0, 255, 255 ) )
end

Output:

Changes the text color when enter is pressed.
Personal tools
Navigation