Revision Difference
DTextEntry:SetMultiline#551981
<function name="SetMultiline" parent="DTextEntry" type="panelfunc">⤶
<ispanel>yes</ispanel>⤶
<description>Enables or disables the multi-line functionality of <page>DTextEntry</page>.</description>⤶
<realm>Client and Menu</realm>⤶
<args>⤶
<arg name="multiline" type="boolean">Whether to enable multiline or not.</arg>⤶
</args>⤶
</function>⤶
⤶
<example>⤶
<description>⤶
</description>⤶
<code>⤶
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 )⤶
</code>⤶
</example>