Spread Windows Forms 10.0 Product Documentation
Adding a Title and Subtitle to a Sheet

You can add a specially formatted area at the top of the component that includes a title, a subtitle or both. A title is set for the component, and a separate subtitle can be set for each sheet. The following figure illustrates a Spread component with a title and a subtitle set for the sheet.

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.

Use the TitleInfo class and its members to display and customize the title and subtitles.

Using a Shortcut

Set the properties of the TitleInfo class.

Example

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

C#
Copy Code
// 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; 
VB
Copy Code
' 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 

Using the Spread Designer

  1. From the Settings menu, select the Titles icon in the Spread Settings section.
  2. Specify the text and whether to display the title and subtitle.
  3. Select OK to close the dialog.
  4. From the File menu choose Apply and Exit to apply your changes to the component and exit Spread Designer.

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback