A form which may be used to display text the player is meant to select and copy or alternately allow them to enter some text of their own . Do note that at least one of your DTextEntry's parents must either be an EditablePanel or derived from it (like a DFrame, for example), else it won't be able to focus and thus be unselectable. You must also call Panel:MakePopup on said panel or the DTextEntry will not work.
This does not clear out previously-pasted text properly.
Issue Tracker: #1588
Inherits the following functions from TextEntry and its parents up to 3 levels deep:
Creates a text entry form that allows you to print messages into the local player's chat window.
local frame = vgui.Create( "DFrame" ) frame:SetSize( 400, 200 ) frame:Center() frame:MakePopup() local TextEntry = vgui.Create( "DTextEntry", frame ) -- create the form as a child of frame TextEntry:SetPos( 25, 50 ) TextEntry:SetSize( 75, 85 ) TextEntry:SetText( "Placeholder Text" ) TextEntry.OnEnter = function( self ) chat.AddText( self:GetValue() ) -- print the form's text as server text end
Pages in category "DTextEntry"
The following 29 pages are in this category, out of 29 total.