Spread Windows Forms 9.0 Product Documentation
StartAnnotationMode(Boolean) Method
Example 


Whether each figure is closed before the next figure is drawn
Starts annotation mode while specifying whether to close figures when a new drawing is started.
Syntax
'Declaration
 
Public Overloads Sub StartAnnotationMode( _
   ByVal closeFigures As Boolean _
) 
'Usage
 
Dim instance As FpSpread
Dim closeFigures As Boolean
 
instance.StartAnnotationMode(closeFigures)
public void StartAnnotationMode( 
   bool closeFigures
)

Parameters

closeFigures
Whether each figure is closed before the next figure is drawn
Example
This example uses the StartAnnotationMode method.
private void button1_Click(object sender, EventArgs e)
        {
            fpSpread1.StartAnnotationMode(true);
            //fpSpread1.StartAnnotationMode();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            fpSpread1.StopAnnotationMode();
        }

        private void fpSpread1_AnnotationModeStarting(object sender, FarPoint.Win.Spread.AnnotationModeEventArgs e)
        {
            
            e.DrawingSurface.ForeColor = Color.BlueViolet;
            e.DrawingSurface.BackColor = Color.Thistle;
        }

        private void fpSpread1_AnnotationModeEnding(object sender, FarPoint.Win.Spread.AnnotationModeEventArgs e)
        {
            listBox1.Items.Add("Stop Drawing");           
        }
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        FpSpread1.StartAnnotationMode(True)
        'FpSpread1.StartAnnotationMode()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        FpSpread1.StopAnnotationMode()
    End Sub

    Private Sub FpSpread1_AnnotationModeStarting(ByVal sender As System.Object, ByVal e As FarPoint.Win.Spread.AnnotationModeEventArgs) Handles FpSpread1.AnnotationModeStarting
        e.DrawingSurface.ForeColor = Color.BlueViolet
        e.DrawingSurface.BackColor = Color.Thistle
    End Sub

    Private Sub FpSpread1_AnnotationModeEnding(ByVal sender As System.Object, ByVal e As FarPoint.Win.Spread.AnnotationModeEventArgs) Handles FpSpread1.AnnotationModeEnding
        ListBox1.Items.Add("Stop Drawing")
    End Sub
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

FpSpread Class
FpSpread Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.