Leadtools.Controls Namespace > ImageViewerInteractiveModes Object : EnableById Method |
function Leadtools.Controls.ImageViewerInteractiveModes.enableById( id )
Parameter | Type | Description |
---|---|---|
id | int | The interactive mode ID to enable. If the ID is not found, then all items in the collection are disabled. |
This method will iterate through all the items in the collection and set IsEnabled to false all the items except when Id is equal to id.
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();