←Select platform

ScrollBarVisible Property

Summary

Enables or disables automatically showing the scroll bars if the image width or height exceeds the control client area.

Syntax

C#
VB
C++
public bool ScrollBarVisible { get; set; } 
  
Public Property ScrollBarVisible As Boolean 
public: 
property bool ScrollBarVisible { 
   bool get(); 
   void set (    bool ); 
} 

Property Value

true, automatically show the scroll bars; false, hide the scroll bars.

Remarks

Default value is true.

Example

This example disables the scrollbars, centers the image and uses the panning features in the left mouse button to scroll the image.

C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Web.Controls; 
using Leadtools.ImageProcessing; 
 
public void WebImageViewer_ScrollBarVisible() 
{ 
   WebImageViewer mainWebImageViewer = new WebImageViewer(); 
   mainWebImageViewer.ImageChanged += new EventHandler(mainWebImageViewer_ImageChanged); 
   mainWebImageViewer.MouseInteractiveMode.LeftButton = ImageViewerMouseInteractiveMode.Pan; 
 
   // disable the scrollbars 
   mainWebImageViewer.ScrollBarVisible = false; 
   // open "MultiPage.tif" 
   mainWebImageViewer.OpenImageUrl(@"Resources\MultiPage.tif"); 
   // display the image with dpi 
   mainWebImageViewer.UseDpi = false; 
   // scroll the image to the center point. 
   mainWebImageViewer.ScrollPosition = new Point(mainWebImageViewer.MaxScrollPosition.X / 2, mainWebImageViewer.MaxScrollPosition.Y / 2); 
 
   mainWebImageViewer.ImageChanged -= new EventHandler(mainWebImageViewer_ImageChanged); 
} 
 
void mainWebImageViewer_ImageChanged(object sender, EventArgs e) 
{ 
   // "New Image is loaded"... 
} 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.ImageProcessing 
Imports Leadtools.Web.Controls 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.OpenImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.OpenImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ScrollBarVisible--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ScrollBarVisible--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ApplyCommand--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ApplyCommand--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.PropertyChanged--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.PropertyChanged--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.AddWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.AddWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.InsertWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.InsertWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.EnsureVisible--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.EnsureVisible--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.GetThumbnailImageByText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.GetThumbnailImageByText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.SetThumbnailText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.SetThumbnailText--> 
 
Public Sub WebImageViewer_ScrollBarVisible() 
   Dim mainWebImageViewer As WebImageViewer = New WebImageViewer() 
   AddHandler mainWebImageViewer.ImageChanged, AddressOf mainWebImageViewer_ImageChanged 
 
   mainWebImageViewer.MouseInteractiveMode.LeftButton = ImageViewerMouseInteractiveMode.Pan 
 
   '' disable the scrollbars 
   mainWebImageViewer.ScrollBarVisible = False 
   '' open "image1.tif" 
   mainWebImageViewer.OpenImageUrl("Resources\MultiPage.tif") 
   '' display the image with dpi 
   mainWebImageViewer.UseDpi = False 
   '' scroll the image to the center point. 
   mainWebImageViewer.ScrollPosition = New Point(CType(mainWebImageViewer.MaxScrollPosition.X / 2, Integer), CType(mainWebImageViewer.MaxScrollPosition.Y / 2, Integer)) 
 
   RemoveHandler mainWebImageViewer.ImageChanged, AddressOf mainWebImageViewer_ImageChanged 
End Sub 
 
Sub mainWebImageViewer_ImageChanged(ByVal sender As Object, ByVal e As EventArgs) 
   '' "New Image is loaded"... 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Web Assembly