CLabels:Attach


The Attach method attaches a CImageView object to the CLabels object. Usually, the CImageView object is specified when the CLabels object is created. Use this method to switch the target image window without creating a new CLabels object. Alternatively, you may create the CLabels object by passing a LabelParams table, then attach it to the CImageView at a later itme.

Syntax

bSuccess = CLabels:Attach( CImageView_obj )

bullet.gif    Where CImageView_obj is a CImageView object connected to an image window.

bullet.gif    On success, true is returned.

Example

Suppose two image windows exist and are connected to the script through two CImageView objects, V1 and V2. The following script directs the CLabels object to work with a new CImageView object.

L = new_labels( V1 )

-- create a new CLabels object attached to V1

  ...

-- do something with the CLabels object.

L:Attach( V2 )

-- attach the CLabels to a different CImageView object

Related Topics

CLabels class, new_labels


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.