function ViolLua.Menu:GenerateCheckbox( Panel, Text, Assignment, Callback, avoidLast )
    -- Have to generate the checkboxes used in the menu.

    -- Generate main checkbox handler.
	local Checkbox = vgui.Create( 'DCheckBoxLabel', Panel )
	Checkbox:Dock( TOP )
    Checkbox:DockMargin( 0, 0, 0, self:Scale( 5 ) )
	Checkbox:SetText( Text )
	Checkbox:SetValue( ViolLua.Config[ Assignment ] )
	Checkbox:SizeToContents( )
    
    Checkbox.OnChange = function( self, Value )
        ViolLua.Config[ Assignment ] = Value

        if ( Callback ) then 
            Callback( Value )
        end
    end
    
    -- Fix layout and painting on button.
    Checkbox.Button:Dock( LEFT )

    Checkbox.Button.Paint = function( self, W, H )
        surface.SetDrawColor( ViolLua.Config[ Assignment ] and ViolLua.Menu.Color or ViolLua.Menu.Colors[ 'Dark Gray' ] )
        surface.DrawRect( 0, 0, W, H )

        surface.SetDrawColor( ViolLua.Menu.Color )
        surface.DrawOutlinedRect( 0, 0, W, H, 1 )
    end

    -- Fix font and layout on label.
    Checkbox.Label:SetFont( 'DefaultSmall' )
    Checkbox.Label:Dock( LEFT )
    Checkbox.Label:DockMargin( self:Scale( 5 ), 0, 0, 0 )

    Checkbox.Label.Think = function( self )
        if ( ViolLua.Config[ 'miscellaneous_menu_labels' ] ) then 
            self:SetTextColor( ViolLua.Menu.Color )
        else
            self:SetTextColor( ViolLua.Colors[ 'White' ] )
        end
    end

    -- Set our last for the right docking elements.
    self.Last = Checkbox

    return Checkbox
end