# Customizing the Dimensions of the Component

Learn to customize the dimensions of the Spread component in this comprehensive guide. Set the overall dimensions and size of the visible area of the spreadsheet with ease.

## Content

You can set the overall dimensions of the Spread component and this determines the size of the visible area of the spreadsheet. The following figure shows the dimensions that you can set by setting the number of pixels for each.
![dimensions of the overall spreadsheet component](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/control_heightwidth.png)
Refer to the Microsoft .NET Framework documentation for more details on the Control.**Height** property or Control.**Width** property.
To calculate the height of the Spread, assuming scroll bars turned off and no headers, calculate the height of all the rows and then add one pixel for every border, so if 10 rows of 20 pixel height, (10 x 20) + (10 x 1) + 1, or 211 in this example. For the Spread width, the process is the same. For more information on setting the row height and column width, refer to [Setting the Row Height or Column Width](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolsize).

## Using the Properties Window

1. Select the Spread component.
2. With the properties window open, in the **Layout** category, select the **Height** property or the **Width** property and type in a new value. The unit is pixels. Press **Enter**. The new dimension is now set.
    Refer to the Microsoft.NET Framework documentation for setting the units of measurement for height to something other than the default, which is pixels.

## Using Code

Add a line of code that sets the specific dimension. Unless you have set it otherwise, the default for the unit of measurement is pixels. Use the **Height** and **Width** properties of the [FpSpread](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.html) class.

## Example

This example shows how to set the height of the Spread component to 250 pixels and the width to 300.

```csharp
fpSpread1.Height = 250;
fpSpread1.Width = 300;
```

```vbnet
fpSpread1.Height = 250
    fpSpread1.Width = 300
```

## See Also

[Customizing the Sheet Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance)
[Customizing the Individual Sheet Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearsheet)
[Customizing the Appearance of a Cell](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcell)
[Customizing the Overall Component Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcontrol)
[Creating and Applying a Style for Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-cellstyle)
[Using Conditional Formatting of Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-interact-condition)
[Customizing the Display of the Pointer](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-cntrlcursor)
[Customizing the User Interface Images](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-userimages)
[Using XP Themes with the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearxptheme)
[Customizing the Renderers](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-rendcustom)
[Handling Right-to-Left Layouts](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-rtlsupport)
[Customizing Painting of Parts of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appear-painting)
[Text Rendering with GDI](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-feattextrender)
[Applying Theme to Customize the Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-spreadthemeapply)