Derma Buttons Question

So, for my first Lua script I decided to make a derma panel with some buttons and stuff. Norhing serious. But this may or may not be a very dumb question. How do I put multiple buttons on one panel? Here is my cl_init Code:

function DermaTest()
	local base = vgui.Create( "DFrame" )
	local button = vgui.Create( "DButton" )
		base:SetPos( ScrW()/2 - 225, ScrH()/2 - 100 )
		base:SetSize( 450, 200 )
		base:SetVisible( true )
		base:SetTitle( "Title" )
		base:SetDraggable( false )
		base:ShowCloseButton( true )
		button:SetParent( base )
		button:SetText( "RDM" )
		button:SetPos( 2, 26 )
		button:SetSize( 150, 50 )
		button.DoClick = function()
			for k, ply in pairs( player.GetAll() ) do
					ply:ChatPrint( "Message" )

If you need anything else to help just let me know.


local button2 = vgui.Create("DButton",base)
--button stuff here

All you do is change the variable name

Also some tips
-Instead of SetParent you cna just do vgui.Create(“element”,parent)
-Keep each element code together or else it gets confusing

Your code in the DoClick function will not work, as derma is clientside, you will have to send a net message to the server and broadcast your message to the players there.

For your question, you add multiple buttons the same way you added the first one, just with a different position.