GdPicture.NET Reference Guide
AnnotationStartEditingText Event (GdViewer)
Example 





GdPicture14 Namespace > GdViewer Class : AnnotationStartEditingText Event
This event is raised when the user starts editing the content of the sticky note or text GdPicture/XMP annotations by double click on the concerned annotation.

Please check the corresponded GdViewer.AnnotationStartEditingTextEventHandler for given parameters.

Syntax
'Declaration
 
Public Event AnnotationStartEditingText As GdViewer.AnnotationStartEditingTextEventHandler
public event GdViewer.AnnotationStartEditingTextEventHandler AnnotationStartEditingText
public event AnnotationStartEditingText: GdViewer.AnnotationStartEditingTextEventHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.AnnotationStartEditingTextEventHandler* AnnotationStartEditingText
public:
event GdViewer.AnnotationStartEditingTextEventHandler^ AnnotationStartEditingText
Remarks
Be aware, that this event only handles GdPicture/XMP annotations, specifically sticky note and text annotations.
Example
How to add this event to your GdViewer control and use it for getting the annotation content before editing.
'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
            
'Add the event.
AddHandler GdViewer1.AnnotationStartEditingText, AddressOf GdViewer1_AnnotationStartEditingText
            
'Define the event.
Sub GdViewer1_AnnotationStartEditingText(ByVal AnnotationIdx As Integer) Handles GdViewer1.AnnotationStartEditingText
    Dim annot As GdPicture14.Annotations.Annotation = GdViewer1.GetAnnotationFromIdx(AnnotationIdx)
    Dim text As String = ""
    If TypeOf annot Is GdPicture14.Annotations.AnnotationStickyNote Then
        text = (CType(annot, GdPicture14.Annotations.AnnotationStickyNote)).Text
    ElseIf TypeOf annot Is GdPicture14.Annotations.AnnotationText Then
        text = (CType(annot, GdPicture14.Annotations.AnnotationText)).Text
    End If
    MessageBox.Show(text, "GdViewer.AnnotationStartEditingText")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
            
//Add the event.
GdViewer1.AnnotationStartEditingText += GdViewer1_AnnotationStartEditingText;
            
//Define the event.
void GdViewer1_AnnotationStartEditingText(int AnnotationIdx)
{
    GdPicture14.Annotations.Annotation annot = GdViewer1.GetAnnotationFromIdx(AnnotationIdx);
    string text = "";
    if (annot is GdPicture14.Annotations.AnnotationStickyNote)
        text = ((GdPicture14.Annotations.AnnotationStickyNote)annot).Text;
    else if (annot is GdPicture14.Annotations.AnnotationText)
        text = ((GdPicture14.Annotations.AnnotationText)annot).Text;
    MessageBox.Show(text, "GdViewer.AnnotationStartEditingText");
}
See Also

Reference

GdViewer Class
GdViewer Members
GdViewer.AnnotationStartEditingTextEventHandler Delegate
GetAnnotationFromIdx Method
Annotation Class
DisplayTextEditBox Method