function TestVGUI( )
local worldpanel = vgui.GetWorldPanel();
worldpanel:SetVisible( true );
worldpanel:MakePopup( );
local frame = vgui.Create( "Frame", worldpanel ); //Create a frame
Frame:SetSize( 200, 200 ); //Set the size to 200x200
Frame:SetPos( 100, 100 ); //Move the frame to 100,100
Frame:SetVisible( true ); //Visible
Frame:MakePopup( ); //Make the frame
Frame:PostMessage( "SetTitle", "text", "Vgui Test" ); //Set the title to "This is the title"
local button = vgui.Create( "Button", frame ); //Create a button that is attached to Frame
Button:SetText( "Toggle noclip" ); //Set the button's text to "Click me!"
Button:SetPos( 30, 5 ); //Set the button's position relative to it's parent(Frame)
Button:SetWide( 100 ); //Sets the width of the button you're making
function button

oClick( )
RunConsoleCommand("noclip"); //This is called when the button is clicked
self:SetText( "Clicked" ); //Set the text to "Clicked"
end
end
concommand.Add( "testvgui", TestVGUI );
Bookmarks