Spread Windows Forms 9.0 Product Documentation
Printing a Sheet with Shapes

You can print shapes as well as the data. Use the PrintShapes property in the PrintInfo object to include printing the shapes when printing a sheet.

For more information on shapes, refer to Customizing Drawing.

Using Code

Use the PrintShapes property to print shapes.

Example

This example prints shapes.

C#
Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
FarPoint.Win.Spread.PrintInfo pi = new FarPoint.Win.Spread.PrintInfo();
pi.PrintShapes =true;
fpSpread1.Sheets[0].PrintInfo = pi;
fpSpread1.PrintSheet(0);
}
private void Form1_Load(object sender, System.EventArgs e)
{
FarPoint.Win.Spread.DrawingSpace.ArrowShape arrow = new FarPoint.Win.Spread.DrawingSpace.ArrowShape();
arrow.BackColor = Color.Plum;
arrow.ForeColor = Color.Pink;
arrow.SetBounds(0,0,200,100);
fpSpread1.Sheets[0].AddShape(arrow);
}
VB
Copy Code
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.PrintShapes = True
fpSpread1.Sheets(0).PrintInfo = pi
FpSpread1.PrintSheet(0)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim arrow As New FarPoint.Win.Spread.DrawingSpace.ArrowShape()
arrow.BackColor = Color.Plum
arrow.ForeColor = Color.Pink
arrow.SetBounds(0, 0, 200, 100)
FpSpread1.ActiveSheet.AddShape(arrow)
End Sub 

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback