Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.5.5
|
Leadtools.Web.Controls Namespace > WebThumbnailViewer Class > Insert Method : Insert(String,Int32,Int32,Int32,String) Method |
'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)
This example replaces the first thumbnail with a "image1.jpg" and set the thumbnail text.
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"); } }