Spread Windows Forms 9.0 Product Documentation
Printing a Sheet with Cell Notes

You can print cell notes as well as the data. Use the PrintNotes property in the PrintInfo object to print notes. The notes can be printed on a page either after the data is printed or as displayed on the sheet.

The following figure shows how printing a sticky note as displayed might look.

Printing

For information about adding cell notes, refer to Adding a Note to a Cell.

Using Code

  1. Use the PrintNotes property to print notes.
  2. Use the PrintSheet method to print.

Example

This example prints notes.

C#
Copy Code
private void Form1_Load(object sender, System.EventArgs e)
{
    fpSpread1.Sheets[0].RowCount = 20;
    fpSpread1.Sheets[0].ColumnCount = 5;
    fpSpread1.TextTipPolicy = FarPoint.Win.Spread.TextTipPolicy.Fixed;
    FpSpread1.Sheets[0].Cells[0, 0].NoteStyle = FarPoint.Win.Spread.NoteStyle.StickyNote;
    fpSpread1.Sheets[0].Cells[0, 0].Note = "test";
}
    
private void button1_Click(object sender, System.EventArgs e)
{
    FarPoint.Win.Spread.PrintInfo pi = new FarPoint.Win.Spread.PrintInfo();
    pi.PrintNotes =FarPoint.Win.Spread.PrintNotes.AsDisplayed;
    fpSpread1.Sheets[0].PrintInfo = pi;
    fpSpread1.PrintSheet(-1);
}
VB
Copy Code
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FpSpread1.Sheets(0).RowCount = 20
    FpSpread1.Sheets(0).ColumnCount = 5
    FpSpread1.TextTipPolicy = FarPoint.Win.Spread.TextTipPolicy.Fixed
    FpSpread1.Sheets(0).Cells(0, 0).NoteStyle = FarPoint.Win.Spread.NoteStyle.StickyNote
    FpSpread1.Sheets(0).Cells(0, 0).Note = "test"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim pi As New FarPoint.Win.Spread.PrintInfo()
    pi.PrintNotes = FarPoint.Win.Spread.PrintNotes.AsDisplayed
    FpSpread1.Sheets(0).PrintInfo = pi
    FpSpread1.PrintSheet(-1)
End Sub
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback