DButton:SetConsoleCommand
Description
Sets a console command to be called when the button is clicked.
This overrides the button's DoClick
method.
Arguments
Example
Creates a button that makes the player say their name.
local button = vgui.Create( "DButton" )
button:SetSize( 100, 35 )
button:SetText( "Say your nickname" )
button:Center()
button:MakePopup()
button:SetConsoleCommand( "say", LocalPlayer():Nick() )