LEADTOOLS WebForms and AJAX (Leadtools.Web assembly)

Add(String,Int32,Int32,String) Method

Show in webframe
Example 





The image URL or image virtual path to which to add its page(s) as thumbnail(s). Each page will be added as a new thumbnail.
The 1-based index of the first page to load.
The 1-based index of the last page to load. Must be greater than or equal to firstPage. You can pass -1 to load from firstPage to the last page in the file.
The thumbnail item text.
Adds a new thumbnail element from an image to the end of the WebThumbnailsViewer control and specify the thumbnail text.
Syntax
public void Add( 
   string imageUrl,
   int firstPage,
   int lastPage,
   string text
)
'Declaration
 
Public Overloads Sub Add( _
   ByVal imageUrl As String, _
   ByVal firstPage As Integer, _
   ByVal lastPage As Integer, _
   ByVal text As String _
) 
'Usage
 
Dim instance As WebThumbnailViewer
Dim imageUrl As String
Dim firstPage As Integer
Dim lastPage As Integer
Dim text As String
 
instance.Add(imageUrl, firstPage, lastPage, text)

            

            
public:
void Add( 
   String^ imageUrl,
   int firstPage,
   int lastPage,
   String^ text
) 

Parameters

imageUrl
The image URL or image virtual path to which to add its page(s) as thumbnail(s). Each page will be added as a new thumbnail.
firstPage
The 1-based index of the first page to load.
lastPage
The 1-based index of the last page to load. Must be greater than or equal to firstPage. You can pass -1 to load from firstPage to the last page in the file.
text
The thumbnail item text.
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing
Imports Leadtools.Web.Controls

Public Sub WebThumbnailViewer_InitWebThumbnailViewerWithText(ByVal webThumbnailViewer As WebThumbnailViewer, ByVal webViewerID As String)
   webThumbnailViewer.CacheFolder = "MyCacheFolderName"
   webThumbnailViewer.ResourcesPath = "Resources"
   webThumbnailViewer.BrowserImageFormat = BrowserImageFormat.Jpeg
   webThumbnailViewer.HorizontalAlignMode = ImageViewerAlignMode.Center
   webThumbnailViewer.VerticalAlignMode = ImageViewerAlignMode.Center
   webThumbnailViewer.LayoutDirection = LayoutDirection.Horizontal
   webThumbnailViewer.ThumbStyle.BackColor = Color.LightGray
   webThumbnailViewer.ThumbStyle.Cursor = "pointer"
   webThumbnailViewer.ThumbStyle.HoverBackColor = Color.Gray
   webThumbnailViewer.SelectedThumbStyle.BackColor = Color.Red
   webThumbnailViewer.SelectedThumbStyle.Cursor = "default"
   webThumbnailViewer.SelectedThumbStyle.HoverBackColor = Color.DarkRed
   webThumbnailViewer.ThumbPadding = 10
   webThumbnailViewer.ThumbSpacing = 10
   webThumbnailViewer.ViewerID = webViewerID
   webThumbnailViewer.ThumbSize = New Size(120, 120)
   webThumbnailViewer.ShowItemText = True
   webThumbnailViewer.Add("Resources\multipage.tif", 1, 1, "Page1")
   webThumbnailViewer.Add("Resources\multipage.tif", 1, 2, "Page2")
   webThumbnailViewer.SelectedIndex = 0
End Sub
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Web.Controls;

public void WebThumbnailViewer_InitWebThumbnailViewerWithText(WebThumbnailViewer webThumbnailViewer, string webViewerID)
{
   webThumbnailViewer.CacheFolder = "MyCacheFolderName";
   webThumbnailViewer.ResourcesPath = @"Resources";
   webThumbnailViewer.BrowserImageFormat = BrowserImageFormat.Jpeg;
   webThumbnailViewer.HorizontalAlignMode = ImageViewerAlignMode.Center;
   webThumbnailViewer.VerticalAlignMode = ImageViewerAlignMode.Center;
   webThumbnailViewer.LayoutDirection = LayoutDirection.Horizontal;
   webThumbnailViewer.ThumbStyle.BackColor = Color.LightGray;
   webThumbnailViewer.ThumbStyle.Cursor = "pointer";
   webThumbnailViewer.ThumbStyle.HoverBackColor = Color.Gray;
   webThumbnailViewer.SelectedThumbStyle.BackColor = Color.Red;
   webThumbnailViewer.SelectedThumbStyle.Cursor = "default";
   webThumbnailViewer.SelectedThumbStyle.HoverBackColor = Color.DarkRed;
   webThumbnailViewer.ThumbPadding = 10;
   webThumbnailViewer.ThumbSpacing = 10;
   webThumbnailViewer.ViewerID = webViewerID;
   webThumbnailViewer.ThumbSize = new Size(120, 120);
   webThumbnailViewer.ShowItemText = true;
   webThumbnailViewer.Add(@"Resources\multipage.tif", 1, 1, "Page1");
   webThumbnailViewer.Add(@"Resources\multipage.tif", 1, 2, "Page2");
   webThumbnailViewer.SelectedIndex = 0;
}
Requirements

Target Platforms

See Also

Reference

WebThumbnailViewer Class
WebThumbnailViewer Members
Overload List

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.