Spread Windows Forms 6.0 Product Documentation
Setting the Row Height or Column Width
Support Options
Spread Windows Forms 6.0 Product Documentation > Developer's Guide > Customizing Row, Column, and Cell Appearance > Customizing the Row or Column Appearance > Setting the Row Height or Column Width

Glossary Item Box

You can set the row height or column width as a specified number of pixels. Each sheet uses and lets you set a default size, making all rows or columns in the sheet the same size. You can override that setting by setting the value for individual rows or columns.

Example of Row Higher and Column Wider

Users can change the row height or column width by dragging the header lines between rows or columns.

For more details refer to the Column.Width method or Row.Height method.

Return to Customizing the Row or Column Appearance.

Using the Properties Window

  1. At design time, in the Properties window, select the Spread component.
  2. Select the Sheets property.
  3. Click the button to display the SheetView Collection Editor.
  4. In the Members list, select the sheet for which to set the column width for a column.
  5. In the properties list, set the Columns property and then click the button to display the Cell, Column, and Row Editor.
  6. Click the column heading of the column for which you want to set the width.
  7. In the properties list, set the Width property.
  8. Click OK to close the Cell, Column, and Row Editor.
  9. Click OK to close the SheetView Collection Editor.

Using a Shortcut

Set the Columns shortcut object Width property.

Example

This example code sets the second column’s width to 100 pixels.

C# Copy Code
// Set second column width to 100.
 
fpSpread1.Sheets[0].Columns[1].Width = 100;
 
VB Copy Code
' Set second column width to 100.
 
FpSpread1.Sheets(0).Columns(1).Width = 100
 

Using Code

Set the Width property for a Column object.

Example

This example code sets the second column’s width to 100 pixels.

C# Copy Code
FarPoint.Win.Spread.Column Col1;
 
Col1 = fpSpread1.Sheets[0].Columns[1];
 
Col1.Width = 100;
 
VB Copy Code
Dim Col1 As FarPoint.Win.Spread.Column
 
Col1 = FpSpread1.Sheets(0).Columns(1)
 
Col1.Width = 100
 

Using the Spread Designer

  1. To set the default column width,
    1. Select the sheet tab for the sheet for which you want to set the default column width.
    2. In the property list, in the Appearance category, select Columns to expand the list of properties for the columns.
    3. In the list of properties for columns, select Default to expand the list of default column settings.
    4. In the list of default settings, change the Width setting.
    5. From the File menu choose Apply and Exit to apply your changes to the component and exit Spread Designer.
  2. To set a specific column width,
    1. Select the column for which you want to change the width.
    2. In the properties list for that column, change the Width property.
    3. From the File menu choose Apply and Exit to apply your changes to the component and exit Spread Designer.
© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.