←Select platform

Insert(string,int,int,int) Method

Summary

Inserts a new thumbnail element(s) from an image to the specified index of the WebThumbnailsViewer control.

Syntax

C#
VB
C++
public void Insert( 
   string imageUrl, 
   int firstPage, 
   int lastPage, 
   int thumbIndex 
) 
  
Public Overloads Sub Insert( _ 
   ByVal imageUrl As String, _ 
   ByVal firstPage As Integer, _ 
   ByVal lastPage As Integer, _ 
   ByVal thumbIndex As Integer _ 
)  
public: 
void Insert(  
   String^ imageUrl, 
   int firstPage, 
   int lastPage, 
   int thumbIndex 
)  

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.

Example

This example replaces the first thumbnail with a "image1.jpg".

C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Web.Controls; 
 
public void WebThumbnailViewer_Insert(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); 
   } 
} 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.Web.Controls 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Add--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Add--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Insert--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Insert--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.ThumbsDirection--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.ThumbsDirection--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Clear--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Clear--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.GetThumbnailInfo--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.GetThumbnailInfo--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.PropertyChanged--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.PropertyChanged--> 
 
Public Sub WebThumbnailViewer_Insert(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) 
   End If 
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