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 |
---|---|
// Add the code to a command button. FarPoint.Win.Spread.PrintInfo pi = new FarPoint.Win.Spread.PrintInfo(); pi.PrintShapes =true; fpSpread1.Sheets[0].PrintInfo = pi; fpSpread1.PrintSheet(0); // Add the code to form load. 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 |
---|---|
' Add the code to a command button. Dim pi as New FarPoint.Win.Spread.PrintInfo() pi.PrintShapes = True fpSpread1.Sheets(0).PrintInfo = pi FpSpread1.PrintSheet(0) ' Add the code to form 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) |