Reference Guide
GdPicture14 Namespace / GdViewer Class / RegionSelectedByUser Event
Example





In This Topic
    RegionSelectedByUser Event (GdViewer)
    In This Topic
    This event is raised when a highlighted region has been selected by a user using the mouse.

    Please check the corresponded GdViewer.RegionSelectedByUserEventHandler for given parameters.

    Highlighted regions for currently displayed document are identified and created when searching text, for example using the SearchText(String,Int32,Boolean) method or the second similar overloaded method as well. You can also define highlighted regions directly using AddRegion(String,Int32,Int32,Int32,Int32,ForegroundMixMode,Int32) or AddRegionInches(String,Single,Single,Single,Single,ForegroundMixMode,Int32) methods.

    Syntax
    'Declaration
     
    
    Public Event RegionSelectedByUser As GdViewer.RegionSelectedByUserEventHandler
    public event GdViewer.RegionSelectedByUserEventHandler RegionSelectedByUser
    public event RegionSelectedByUser: GdViewer.RegionSelectedByUserEventHandler; 
    In JScript, you can handle the events defined by another class, but you cannot define your own.
    public: __event GdViewer.RegionSelectedByUserEventHandler* RegionSelectedByUser
    public:
    event GdViewer.RegionSelectedByUserEventHandler^ RegionSelectedByUser
    Remarks
    Be aware that the RegionsAreEditable property needs to be turned on to enable the region selection.
    Example
    How to add this event to your GdViewer control.
    'We assume that the GdViewer1 control has been properly integrated.
    Friend WithEvents GdViewer1 As GdPicture14.GdViewer
                
    'Add the event.
    AddHandler GdViewer1.RegionSelectedByUser, AddressOf GdViewer1_RegionSelectedByUser
                
    'Define the event.
    Sub GdViewer1_RegionSelectedByUser(ByVal RegionID As Integer) Handles GdViewer1.RegionSelectedByUser
        'Do your stuff here.
    End Sub
    //We assume that the GdViewer1 control has been properly integrated.
                
    //Add the event.
    GdViewer1.RegionSelectedByUser += GdViewer1_RegionSelectedByUser;
                
    //Define the event.
    void GdViewer1_RegionSelectedByUser(int RegionID)
    {
        //Do your stuff here.
    }
    See Also