You need to get a reference to the control you want to hide. In this case you luckily get it as a parameter.
public void newPanelcategory_Click(object sender, EventArgs e)
{
Button buttonToHide = sender as Button;
if(buttonToHide == null)
{
}
buttonToHide.Visible = false;
}