Called by DTextEntry:OnTextChanged when the user modifies the text in the DTextEntry.
You should override this function to define custom behavior when the DTextEntry text changes.
Called whenever enter is pressed on a DTextEntry.
DTextEntry:IsEditing will still return true in this callback!
Called whenever the DTextEntry gains focus.
Called from DTextEntry's TextEntry:OnKeyCodeTyped override whenever a valid character is typed while the text entry is focused.
Called whenever the DTextEntry lose focus.
Called when the text changes of the DTextEntry are applied. (And set to the attached console variable, if one is given)
See also DTextEntry:OnChange for a function that is called on every text change, even if the console variable is not updated.
You should override this function to define custom behavior when the text changes.
This method is called:
When Enter is pressed after typing
When DTextEntry:SetValue is used
For every key typed - only if DTextEntry:SetUpdateOnType was set to true (default is false)
Adds an entry to DTextEntry's history.
See DTextEntry:SetHistoryEnabled.
Called whenever the value of the panel has been updated (whether by user input or otherwise).
It allows you to determine whether a user can modify the TextEntry's text.
By default, this only checks whether the panel disallows numeric characters, preventing it from being edited if the value contains any.
This is actually an engine hook that only works on TextEntry derived elements.
If you are looking for a way to modify character limits, see Panel:SetMaximumCharCount
Returns whether a string is numeric or not.
Always returns false if the DTextEntry:SetNumeric is set to false.
Called by the DTextEntry when a list of autocompletion options is requested. Meant to be overridden.
Returns the cursor color of a DTextEntry.
We advise against using this. It may be changed or removed in a future update.
Use Panel:IsEnabled instead.
Returns whether the textbox is disabled. Use Panel:IsEnabled instead.
We advise against using this. It may be changed or removed in a future update.
Alias of DTextEntry:GetPaintBackground. Use that instead.
Whether the background is displayed or not.
We advise against using this. It may be changed or removed in a future update.
Returns the value set by DTextEntry:SetDrawBorder.
Returns whether pressing Enter can cause the panel to lose focus. Note that a multiline DTextEntry cannot be escaped using the Enter key even when this function returns true.
Returns the contents of the DTextEntry as a number.
Returns the highlight/text selection color of the text entry. If it was not overwritten, it will return the derma skin value. (colTextEntryTextHighlight)
Returns whether the history functionality of DTextEntry is enabled. See DTextEntry:AddHistory.
Similar to DTextEntry:GetFloat, but rounds the value to the nearest integer.
Returns whether only numeric characters (123456789. -) can be entered into the DTextEntry.
Whether the background is displayed or not
Return current color of panel placeholder
Returns the placeholder text set with DTextEntry:SetPlaceholderText.
Returns whether or not the panel accepts tab key.
Returns the text color of a DTextEntry.
Returns whether the DTextEntry is set to run DTextEntry:OnValueChange every time a character is typed or deleted or only when Enter is pressed.
Returns whether this DTextEntry is being edited or not. (i. e. has focus)
This is used internally - although you're able to use it you probably shouldn't.
Called internally when the text inside the DTextEntry changes. This is an implementation of TextEntry:OnTextChanged
You should not override this function. Use DTextEntry:OnValueChange instead.
This is used internally - although you're able to use it you probably shouldn't.
You really should be using DTextEntry:GetAutoComplete instead.
Builds a DMenu for the DTextEntry based on the input table.
Sets the cursor's color in DTextEntry (the blinking line).
We advise against using this. It may be changed or removed in a future update.
Use Panel:SetEnabled instead.
Disables input on a DTextEntry and greys it out visually. This differs from DTextEntry:SetEditable which doesn't visually change the textbox.
We advise against using this. It may be changed or removed in a future update.
Alias of DTextEntry:SetPaintBackground. Use that instead.
We advise against using this. It may be changed or removed in a future update.
Does nothing.
Disables Input on a DTextEntry. This differs from DTextEntry:SetDisabled - SetEditable will not affect the appearance of the textbox.
Sets whether pressing the Enter key will cause the DTextEntry to lose focus or not, provided it is not multiline. This is true by default.
Changes the font of the DTextEntry.
Sets/overrides the default highlight/text selection color of the text entry.
Enables or disables the history functionality of DTextEntry. This allows the player to scroll through history elements using up and down arrow keys.
See DTextEntry:AddHistory.
Sets whether or not to decline non-numeric characters as input.
Numeric characters are 1234567890. -
Sets whether to show the default background of the DTextEntry.
Allow you to set placeholder color.
Sets the placeholder text that will be shown while the text entry has no user text. The player will not need to delete the placeholder text if they decide to start typing.
Sets whether or not the panel accepts tab key.
Disabling tab key prevents the panel from unfocusing by mouse, however, still works for focusing to other keyboard focus.
Sets the text color of the DTextEntry.
Sets whether we should fire DTextEntry:OnValueChange every time we type or delete a character or only when Enter is pressed.
Sets the text of the DTextEntry and calls DTextEntry:OnValueChange.
The text of the DTextEntry only changes if it's not currently being typed in. If you would rather set the text regardless, use Panel:SetText.
This is used internally - although you're able to use it you probably shouldn't.
Used by DTextEntry:OnTextChanged, DTextEntry:OnEnter and DTextEntry:OnLoseFocus
Updates the ConVar associated with the TextEntry to its new value.
This is used internally - although you're able to use it you probably shouldn't.
Used internally to set text from the history.
This is used internally - although you're able to use it you probably shouldn't.
Used internally to set text from the autocomplete menu.