Spread Windows Forms 9.0 Product Documentation > Developer's Guide > Customizing Row, Column, and Cell Appearance > Customizing the Appearance of Headers > Setting the Height or Width of Header Cells |
You can customize the appearance of header cells by changing the row height or column width, or both, in any of the rows or columns of headers.
You can change the size by accessing properties in the RowHeader class for the row header or the ColumnHeader class for the column header or both.
Use the Height property in the ColumnHeader class and the Width property in the RowHeader class.
This example sets the column header height and row header width.
C# |
Copy Code
|
---|---|
private void Form1_Load(object sender, System.EventArgs e) { // Change the column header height to 90 pixels. fpSpread1.ActiveSheet.ColumnHeader.Rows[0].Height = 90; // Change the row header width to 80 pixels. fpSpread1.ActiveSheet.RowHeader.Columns[0].Width = 80; } |
VB |
Copy Code
|
---|---|
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Change the column header height to 90 pixels. FpSpread1.ActiveSheet.ColumnHeader.Rows(0).Height = 90 ' Change the row header width to 80 pixels. FpSpread1.ActiveSheet.RowHeader.Columns(0).Width = 80 End Sub |