# Hiding a Specific Command Button

Customize the display of the Command buttons in the Command bar by hiding any or all of the command buttons.

## Content

You can customize the display of the command buttons in the command bar by hiding any or all of the command buttons.
To hide a command button, set the [Visible](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.CommandBarInfo.Visible.html) property to false in the event that creates the button.

## Using Code

Use the [CreateButton](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.CreateButton.html) event to hide certain buttons.

## Example

This example uses code to hide the print icon by adding the [Visible](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.CreateButtonEventArgs.Visible.html) property to the [CreateButton](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.CreateButton.html) event. The result is shown in this figure.
![Command buttons without the Print button](https://cdn.mescius.io/document-site-files/images/346c9178-0ed8-4fb9-908b-1565b22fb408/artwork/commandbuttons-sansprint.png)

```csharp
private void FpSpread1_CreateButton(object sender, FarPoint.Web.Spread.CreateButtonEventArgs e)
{
    if (e.Command == "Print")
    {
        e.Visible = false;
    }
}
```

```vbnet
Private Sub FpSpread1CreateButton(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.CreateButtonEventArgs) Handles FpSpread1.CreateButton
If e.Command = "Print" Then
e.Visible = False
End If
End Sub
```