ScrollPosition Property

Summary

Gets or sets the location of the auto-scroll position.

Syntax

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

Property Value

A Point object that represents the auto-scroll position in pixels.

Example

This displays the scroll positions after each zoom

C#
using Leadtools.WinForms; 
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Color; 
using Leadtools.Drawing; 
 
private void viewer_ScrollViewer(object sender, EventArgs e) 
{ 
   RasterImageViewer viewer = sender as RasterImageViewer; 
   string s = string.Format("ScrollPosition: {0}", viewer.ScrollPosition); 
   Console.WriteLine(s); 
} 
 
public void RasterImageViewer_ScrollViewer(RasterImageViewer viewer) 
{ 
   viewer.ScrollViewer += new EventHandler(viewer_ScrollViewer); 
 
   MessageBox.Show("Scroll the image and the 'ScrollViewer' event gets fired"); 
   // or do something in code to cause a scroll 
} 

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.