Panels have a function called PerformLayout, in there, you should place all the layout related code, both of the panel itself, but also of any panels it might contain. Think the DFrame for example, it has to place the closebutton to the topright, if it changes size, it needs to reposition the closebutton. That is done in PerformLayout. Panel:SetSize and (perhaps?) Panel:SetPos calles Panel:InvalidateLayout() (which in turn calls PerformLayout). You can call InvalidateLayout yourself if you want to re-layout something, however, you -usually- don’t need to call this yourself.
[lua] local textbox = vgui.Create( “DTextEntry”, parent );
textbox:SetMultiline( true ); – Enable multiline to resize height
textbox:SetWide( ( parent:GetWide( ) ) - 30 ); – Set it to the parent width - border and padding
textbox:SetTall( textbox:GetTall( ) * 5 ); – Set it 5 times default height[/lua]