LEADTOOLS WebForms and AJAX (Leadtools.Web assembly)
LEAD Technologies, Inc

ScrollBarVisible Property

Example 





Enables or disables automatically showing the scroll bars if the image width or height exceeds the control client area.
Syntax
public bool ScrollBarVisible {get; set;}
'Declaration
 
Public Property ScrollBarVisible As Boolean
'Usage
 
Dim instance As WebImageViewer
Dim value As Boolean
 
instance.ScrollBarVisible = value
 
value = instance.ScrollBarVisible
public bool ScrollBarVisible {get; set;}
 get_ScrollBarVisible();
set_ScrollBarVisible(value);
public:
property bool ScrollBarVisible {
   bool get();
   void set (    bool value);
}

Property Value

true, automatically show the scroll bars; false, hide the scroll bars.
Remarks
Default value is true.
Example
 
Public Sub WebImageViewer_ScrollBarVisible(ByVal mainWebImageViewer As 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
public void WebImageViewer_ScrollBarVisible(WebImageViewer mainWebImageViewer)
{
   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"...
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

WebImageViewer Class
WebImageViewer Members
WebImageViewer Client Class

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.