EnsureVisible Method

Summary
Ensures that the specified thumbnail item is visible within the control, scrolling the contents of the control if necessary.
Syntax
C#
VB
C++
public void EnsureVisible( 
   int thumbIndex 
) 
  
Public Sub EnsureVisible( _ 
   ByVal thumbIndex As Integer _ 
)  
public: 
void EnsureVisible(  
   int thumbIndex 
)  

Parameters

thumbIndex
The thumbnail item to scroll into view.

Remarks

When you call this method the control will check if the thumbnail item referenced by thumbIndex is visible if it is visible nothing will change, but if not the control will scroll to this thumbnail item to make it visible.

Example

This example ensures that the currently selected thumbnail is visible.

C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Web.Controls; 
 
public void WebThumbnailViewer_EnsureVisible(WebThumbnailViewer webThumbnailViewer) 
{ 
   if (webThumbnailViewer.SelectedIndex != -1) 
      webThumbnailViewer.EnsureVisible(webThumbnailViewer.SelectedIndex); 
} 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.ImageProcessing 
Imports Leadtools.Web.Controls 
 
Public Sub WebThumbnailViewer_EnsureVisible(ByVal webThumbnailViewer As WebThumbnailViewer) 
   If webThumbnailViewer.SelectedIndex <> -1 Then 
      webThumbnailViewer.EnsureVisible(webThumbnailViewer.SelectedIndex) 
   End If 
End Sub 
Requirements

Target Platforms

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Web Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.