Thanks, DText Entry works perfectly!
I explain (I think you understand with my lines below) : I would like to manage a player writes a texr (with DTextEntry), and in an other DFrame we can see the text the player wrote… Just simple.
I tried :
local ReasonTextEntry = vgui.Create( "DTextEntry", DermaCreateSuit )
ReasonTextEntry:SetPos( 150, 100 )
ReasonTextEntry:SetSize( 400, 100 )
ReasonTextEntry:SetText( "" )
local ButtonFinished = vgui.Create("DButton", DermaCreateSuit)
ButtonFinished:SetText( "CREATE" )
ButtonFinished:SetPos( 225, 420 )
ButtonFinished:SetSize( 100, 50 )
ButtonFinished:SetFont( "computerFont" )
ButtonFinished:SetTextColor( Color( 255, 0, 0, 255 ) )
ButtonFinished.Paint = function( self )
surface.SetDrawColor(50, 50, 50, 255)
surface.DrawOutlinedRect(0, 0, self:GetWide(), self:GetTall())
ButtonFinished.DoClick = function()
OpenMenuComputer = false
LocalPlayer():ChatPrint( "Your police report has been created !")
reason = ReasonTextEntry:GetValue()
local ReasonTextEntry2 = vgui.Create( "DTextEntry", DermaSearchSuit )
ReasonTextEntry2:SetPos( 150, 100 )
ReasonTextEntry2:SetSize( 400, 100 )
ReasonTextEntry2:SetText( reason )
But i have this error :
[ERROR] addons/xxxx/lua/entities/xxxx/cl_init.lua:227: bad argument #1 to ‘SetText’ (string expected, got nil)
I tried ReasonTextEntry2:SetText( ReasonTextEntry:GetValue() ) but doesn’t work…
I think this is not getvalue or there is a problem, but in my other DFrame there is no the text as the first… Please help me…
If I asked you for the serverside, this is because maybe i must use net to send the string at the server and re-send at the client but :
1- No interest / 2- If this is just client, i don’t have to send client…
To summarize, I just want to find the function that will allow me to have the entered text in an other DFrame… (I am not blocked as for DTextEntry but also for DListView and the GetSelectedLine but it’s the same principle so if you help me a little bit I would appreciate it and I think I understand).
Thanks by advance!