# Allowing the User to Resize Rows or Columns

Explore the techniques for enabling user-resizable rows and columns in your spreadsheet design.

## Content

You can allow the user to adjust the size of a row or column in the sheet. Set the [Resizable](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Row.Resizable.html) property for the [Row](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Row.html) class to allow the user to resize rows and the [Resizable](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Column.Resizable.html) property for the [Column](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Column.html) class to allow the user to resize columns. The user can also double-click on the border between the column headers to resize the column to match the width of the header text.
For users to resize rows or columns, they left click on the edge of the header of the row or column to resize and drag the side of the header and release the mouse at the desired size. While the left mouse button is down, a bar is displayed along with the resize pointer as shown in the following figure. Be sure to click on the right edge of the column and bottom edge of the row.
![Example of the Cursor for Column Resizing](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/cursor-resize.png)

## Automatic Adjustment by Double Click

Double-clicking on the row or column edge resizes the row or column to fit the tallest or widest content of that row or column (preferred height or width). Wrapped text in the column is ignored when double-clicking on a column divider. Unwrapped text is ignored when double-clicking on a row divider. You can specify the automatic fit behavior with the [AutoFitColumnOptions](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.AutoFitColumnOptions.html) or [AutoFitRowOptions](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.AutoFitRowOptions.html) property.

## Header Area Resize

By default, user resizing of rows or columns is allowed for rows and columns in the data area and not allowed for the header area. In code, you can resize row and column headers, not just data area rows and columns. You can override the default behavior using the [Resizable](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Row.Resizable.html) property and prevent the user from resizing.
The following code turns on resizing for a single column in the row header:
`spread.Sheets[0].RowHeader.Columns[0].Resizable = true;`
The following code turns on resizing for all columns in the row header:
`spread.Sheets[0].RowHeader.Columns.Default.Resizable = true;`
You can determine if a row or column can be resized by the user with these methods in the SheetView class:

* [GetColumnSizeable](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.GetColumnSizeable.html)
* [SetColumnSizeable](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.SetColumnSizeable.html)
* [GetRowSizeable](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.GetRowSizeable.html)
* [SetRowSizeable](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.SetRowSizeable.html)

To resize the rows or column based on the size of the data, refer to [Resizing the Row or Column to Fit the Data](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolsize/spwin-rowcolresizefit).

## Using the Properties Window

1. At design time, in the **Properties** window, select **Sheet**.
2. In the **Properties** window, select **Column** or select **Row**, and click on the button for the **Cell, Column, and Row Editor**.
3. In the Editor, select a column or a row.
4. Select the **Resizable** property.
5. Click the drop-down arrow to display the choices and select the value (True or False). Repeat this for each property.

## Method to set

Set the [Resizable](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Row.Resizable.html) property for the row or [Resizable](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Column.Resizable.html) property for the column.

## **Example**

The following example sets the sheet to allow the first row and first column to be resizable.

```csharp
fpSpread1.Sheets[0].Columns[0].Resizable = true;
fpSpread1.Sheets[0].Rows[0].Resizable = true;
```

```vbnet
fpSpread1.Sheets(0).Columns(0).Resizable = True
fpSpread1.Sheets(0).Rows(0).Resizable = True
```

## Using the Spread Designer

1. Select **Sheet** from the drop-down combo list located on the top right side of the Designer.
2. From the **Appearance** category, select **Column** or select **Row**, and click on the button for the **Cell, Column, and Row Editor**.
3. In the Editor, select a column or a row.
4. Select the **Resizable** property.
5. Select the value from the drop-down list (either True or False).
6. From the **File** menu, select **Save and Exit** to save the changes.

## See Also

[Setting the Row Height or Column Width](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolsize)
[Resizing the Row or Column to Fit the Data](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolsize/spwin-rowcolresizefit)
[Using Auto Row Height](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolsize/Using-Auto-Row-Height)