enableById Method

Summary

Enables an interactive mode giving its ID in the collection.

Syntax

JavaScript Syntax
ImageViewerInteractiveModes.prototype.enableById = function(id) 
TypeScript Syntax
enableById(id: number): void; 

Parameters

id

The interactive mode ID to enable. If the ID is not found, then all items in the collection are disabled.

Remarks

This method will iterate through all the items in the collection and set IsEnabled to false all the items except when id.

Example

JavaScript Example
this._imageViewer.interactiveModes.beginUpdate(); 
var panZoomMode = new lt.Controls.ImageViewerPanZoomInteractiveMode; 
panZoomMode.isEnabled = true; 
this._imageViewer.interactiveModes.add(panZoomMode); 
this._imageViewer.interactiveModes.enableById(lt.Controls.ImageViewerInteractiveMode.panZoomModeId); 
this._imageViewer.interactiveModes.endUpdate(); 

Requirements

Target Platforms

Help Version 19.0.2017.10.18
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly