Spread Windows Forms 15.0
Spread Windows Forms 15.0 Product Documentation / Developer's Guide / Headers / Setting the Height or Width of Header
In This Topic
    Setting the Height or Width of Header
    In This Topic

    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.

    Header with row heightened and column widened

    Method to set

    Use the Height property in the ColumnHeader class and the Width property in the RowHeader class.

    Example

    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
    
    See Also