InteractiveModeMouseButton Property

Summary

Gets or sets the current mouse button associated with the viewer interactive.

Syntax

C#
C++/CLI
C++
public virtual MouseButtons InteractiveModeMouseButton { get; set; } 
public: 
virtual property MouseButtons InteractiveModeMouseButton { 
   MouseButtons get(); 
   void set (    MouseButtons ); 
} 
public:  
   virtual property MouseButtons^ InteractiveModeMouseButton 
   { 
      MouseButtons^ get() 
      void set(MouseButtons^ value) 
   } 

Property Value

A System.Windows.Forms.MouseButtons enumeration member that specify the current mouse button associated with the viewer interactive. Default value is MouseButtons.Left.

Remarks

Use this property to change the mouse button responsible for controlling the current interactive mode (InteractiveMode) of this RasterImageViewer. Be careful when setting the value of this property to MouseButtons.Right since this might conflict with any context menu strips you have attached to the viewer.

Example

C#
using Leadtools.WinForms; 
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Color; 
using Leadtools.Drawing; 
 
private void viewer_InteractiveModeChanged(object sender, EventArgs e) 
{ 
   RasterImageViewer viewer = sender as RasterImageViewer; 
   string s = string.Format("InteractiveMode changed to: {0}", viewer.InteractiveMode.ToString()); 
   MessageBox.Show(s); 
} 
 
public void RasterImageViewer_InteractiveMode(RasterImageViewer viewer) 
{ 
   viewer.InteractiveModeChanged += new EventHandler(viewer_InteractiveModeChanged); 
   viewer.InteractivePan += new EventHandler<RasterViewerLineEventArgs>(viewer_InteractivePan); 
 
   viewer.InteractiveRegionType = RasterViewerInteractiveRegionType.Ellipse; 
   viewer.InteractiveRegionCombineMode = RasterRegionCombineMode.Set; 
 
   switch (viewer.InteractiveMode) 
   { 
      case RasterViewerInteractiveMode.None: 
         viewer.InteractiveMode = RasterViewerInteractiveMode.Pan; 
         break; 
 
      case RasterViewerInteractiveMode.Pan: 
         viewer.InteractiveMode = RasterViewerInteractiveMode.MagnifyGlass; 
         break; 
 
      case RasterViewerInteractiveMode.MagnifyGlass: 
         viewer.InteractiveMode = RasterViewerInteractiveMode.Region; 
         break; 
 
      case RasterViewerInteractiveMode.Region: 
         viewer.InteractiveMode = RasterViewerInteractiveMode.None; 
         break; 
   } 
   viewer.InteractiveModeChanged -= new EventHandler(viewer_InteractiveModeChanged); 
} 

Requirements

Target Platforms

See Also

Reference

RasterImageViewer Class

RasterImageViewer Members

Help Version 22.0.2023.2.9
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.WinForms Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.