Spread for Windows Forms 6.0
Adding a Title and Subtitle to a Sheet

You can add a specially formatted area at the top of the spreadsheet that includes either a title or a subtitle or both. An example is shown here of a spreadsheet that has a title and a subtitle.

Spread control with red grid lines

The title is set using the TitleInfo property at the FpSpread level. The subtitle is set using the TitleInfo property at the sheet level. So titles apply to the overall Spread component, while subtitles can be different for each sheet.

The API members that are involved include:

Return to Customizing the Individual Sheet Appearance.

Using a Shortcut

Set the properties of the TitleInfo class.

    Example

    This example code sets and displays a title for the component and subtitle for the sheet.

    [C#]

    // Show the title for the entire spreadsheet component.

    FpSpread1.TitleInfo.Visible = true;

    FpSpread1.TitleInfo.Text = "FarPoint Spread Title";

    FpSpread1.TitleInfo.HorizontalAlign = FarPoint.Win.Spread.CellHorizontalAlignment.Center;

    // Show the subtitle for the individual sheet.

    FpSpread1.Sheets[0].TitleInfo.Visible = true;

    FpSpread1.Sheets[0].TitleInfo.Text = "Sheet Only Subtitle";

    FpSpread1.Sheets[0].TitleInfo.HorizontalAlign = FarPoint.Win.Spread.CellHorizontalAlignment.Center;

    FpSpread1.Sheets[0].TitleInfo.BackColor = System.Drawing.Color.Aqua;

    [Visual Basic]

    ' Show the title for the entire spreadsheet component.

    FpSpread1.TitleInfo.Visible = True

    FpSpread1.TitleInfo.Text = "FarPoint Spread Title"

    FpSpread1.TitleInfo.HorizontalAlign = FarPoint.Win.Spread.CellHorizontalAlignment.Center

    ' Show the subtitle for the individual sheet.

    FpSpread1.Sheets(0).TitleInfo.Visible = True

    FpSpread1.Sheets(0).TitleInfo.Text = "Sheet Only Subtitle"

    FpSpread1.Sheets(0).TitleInfo.HorizontalAlign = FarPoint.Win.Spread.CellHorizontalAlignment.Center

    FpSpread1.Sheets(0).TitleInfo.BackColor = System.Drawing.Color.Aqua