LEADTOOLS WebForms and AJAX (Leadtools.Web assembly)

Insert(String,Int32,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 0-based index at which the new thumbnail element(s) should be inserted.
The thumbnail item text.
Inserts a new thumbnail element(s) from an image to the specified index of the WebThumbnailsViewer control and specify the thumbnail text.
Syntax
public void Insert( 
   string imageUrl,
   int firstPage,
   int lastPage,
   int thumbIndex,
   string text
)
'Declaration
 
Public Overloads Sub Insert( _
   ByVal imageUrl As String, _
   ByVal firstPage As Integer, _
   ByVal lastPage As Integer, _
   ByVal thumbIndex As Integer, _
   ByVal text As String _
) 
'Usage
 
Dim instance As WebThumbnailViewer
Dim imageUrl As String
Dim firstPage As Integer
Dim lastPage As Integer
Dim thumbIndex As Integer
Dim text As String
 
instance.Insert(imageUrl, firstPage, lastPage, thumbIndex, text)

            

            
public:
void Insert( 
   String^ imageUrl,
   int firstPage,
   int lastPage,
   int thumbIndex,
   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.
thumbIndex
The 0-based index at which the new thumbnail element(s) should be inserted.
text
The thumbnail item text.
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing
Imports Leadtools.Web.Controls

Public Sub WebThumbnailViewer_InsertWithText(ByVal webThumbnailViewer As WebThumbnailViewer)
   ' Check if there is at least one thumbnail to replace.
   If webThumbnailViewer.Count > 1 Then
      ' Remove the first thumbnail image.
      webThumbnailViewer.Remove(0, 0)
      ' insert a new image into as the first thumbnail.
      webThumbnailViewer.Insert("Resources\image1.jpg", 1, 1, 0, "The New Image")
   End If
End Sub
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Web.Controls;

public void WebThumbnailViewer_InsertWithText(WebThumbnailViewer webThumbnailViewer)
{
   // Check if there is at least one thumbnail to replace.
   if(webThumbnailViewer.Count > 1)
   {
      // Remove the first thumbnail image.
      webThumbnailViewer.Remove(0, 0);
      // insert a new image into as the first thumbnail.
      webThumbnailViewer.Insert(@"Resources\image1.jpg", 1, 1, 0, "The New Image");
   }
}
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.