Garry's Mod Wiki

Panel:SetMultiline

  Panel:SetMultiline( boolean multiline )

Description

Enables or disables the multi-line functionality of TextEntry panel and its derivatives.

Arguments

1 boolean multiline
Whether to enable multiline or not.

Example

concommand.Add( "test_textentry", function(ply) 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:Dock( FILL ) TextEntry:SetMultiline( true ) TextEntry.OnChange = function( self ) chat.AddText( self:GetValue() ) -- print the textentry text as a chat message end end )