# Adding a Status Bar

Learn how to add a status bar to your component, set zoom settings, and display important information such as average, sum, and counts for selected cells.

## Content

You can add a status bar to the component. The status bar allows you to set zoom settings and displays information such as the average, sum, and counts for selected cells.
The following image displays the sum, average, count, and zoom slider in the status bar.
![Status bar displaying the sum, average, count, and zoom slider for the selected cells in the spreadsheet](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/statusbar-newimage.png)
The StatusBar uses the formatter of the active cell to display the text. It displays the value of the active cell along with its formatter. For example, If the active cell has a NumberCellType with DecimalPlaces set to 3, then in the StatusBar it will display the value with three decimal places.
The following options are available in the status bar.

| **Option** | **Description** |
| ------ | ----------- |
| Average | This option displays the average from the selected cells that contain numerical values. |
| Count | This option displays the number of selected cells. |
| Minimum | This option displays the minimum numerical value in the selected cells. |
| Maximum | This option displays the maximum numerical value in the selected cells. |
| Numerical Count | This option displays the number of selected cells that contain numerical values. |
| Sum | This option displays the sum of numerical values in selected cells. |
| Zoom (100%) | This option displays the zoom level. Select the zoom percentage to display a dialog that allows you to set additional magnification options. |
| Zoom Slider | This option displays a slider with plus and minus buttons for changing the zoom options. |

You can right-click on the status bar to display menu options that you can check or uncheck.
![Context menu for status bar](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/statusbarmenu.png)

## Setting Method

You can display the status bar by setting [StatusBarVisible](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.StatusBarVisible.html) property of [FpSpread](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.html) class to true.

## Sample Code

This example adds a status bar to the component and sets colors for the status bar.

```csharp
fpSpread1.StatusBarVisible = true;
fpSpread1.StatusBar.BackColor = Color.LemonChiffon;
fpSpread1.StatusBar.ZoomSliderColor = Color.Turquoise;
fpSpread1.StatusBar.ForeColor = Color.OliveDrab;
fpSpread1.StatusBar.ZoomButtonHoverColor = Color.Gold;
fpSpread1.StatusBar.ZoomSliderTrackColor = Color.DodgerBlue;
fpSpread1.StatusBar.ZoomSliderHoverColor = Color.BurlyWood;
```

```vbnet
FpSpread1.StatusBarVisible = True
FpSpread1.StatusBar.BackColor = Color.LemonChiffon
FpSpread1.StatusBar.ZoomSliderColor = Color.Turquoise
FpSpread1.StatusBar.ForeColor = Color.OliveDrab
FpSpread1.StatusBar.ZoomButtonHoverColor = Color.Gold
FpSpread1.StatusBar.ZoomSliderTrackColor = Color.DodgerBlue
FpSpread1.StatusBar.ZoomSliderHoverColor = Color.BurlyWood
```

## Using the Spread Designer

1. Select Spread in the Properties window.
2. Set StatusBarVisible property to true.

## See Also

[Spreadsheet Objects](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects)
[Understanding Parts of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-useinterface)
[Object Parentage](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-knowobjparentage)
[Resetting Parts of the Interface](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-cntrlresets)
[Improving Performance by Suspending the Layout](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-complayout)
[Allowing User Functionality](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-useritems)
[Allowing the User to Zoom the Display of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-cntrlzoom)
[Working with Scroll Bars](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-scroll)
[Customizing Viewports](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-sheetviewports)
[Customizing Split Boxes](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-sheetsplitboxes)
[Ways to Improve Performance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-perfimprovements)
[Spreadsheet Objects](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects)
[Understanding Parts of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-useinterface)
[Object Parentage](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-knowobjparentage)
[Resetting Parts of the Interface](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-cntrlresets)
[Improving Performance by Suspending the Layout](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-complayout)
[Allowing User Functionality](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-useritems)
[Allowing the User to Zoom the Display of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-cntrlzoom)
[Working with Scroll Bars](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-scroll)
[Customizing Viewports](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-sheetviewports)
[Customizing Split Boxes](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-sheetsplitboxes)
[Ways to Improve Performance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-perfimprovements)