OnValueChanged Not Triggering

I am probably using this wrong, so go ahead and rate this dumb :stuck_out_tongue: - OnValueChanged doesn’t see to be triggering.

	SB.VGUI.PlayerSearch = vgui.Create( "DTextEntry", SB.VGUI.PlayerCountContainer )
	SB.VGUI.PlayerSearch:SetSize( 200, SB.VGUI.PlayerSearch:GetParent():GetTall() - 12 )
	SB.VGUI.PlayerSearch:SetPos( SB.VGUI.PlayerSearch:GetParent():GetWide() - SB.VGUI.PlayerSearch:GetWide() - 5, 6 )
	SB.VGUI.PlayerSearch:SetText( "" )
	SB.VGUI.PlayerSearch.OnValueChanged = function( self )

Should ‘CHANGED’ not then be printed client-side every time a letter is typed or removed from the DTextEntry?


The panel hook is

DTextEntry:OnValueChange, not DTextEntry:OnValueChanged. If you want it to update whenever you type, you need to use DTextEntry:SetUpdateOnType too. Obviously, you should just use true as your only parameter.

Thanks a lot this worked. :slight_smile: