CLabels:Attach
The Attach method associates a CImageView object with an existing CLabels object. This method automatically opens the Labeling toolbar in the image window attached to the CImageView.
bSuccess = CLabels:Attach( CImageView ) |
The target CImageView can be specified in the new constructor for the CLabels object. If you use a constructor that does not specify the CImageView, then you must use the Attach method before labels can be drawn on an image. The Attach method may also be used to switch labeling action between CImageView windows without instantiating new CLabel objects.
Suppose a CImageView V exists and displays 1 or more images. The following script fragment uses the "new + Attach" method to draw a label on an image:
|
-- create a new CLabels L |
|
-- target coordinates |
|
-- label coordinates |
|
-- attach to the CImageView V |
|
-- I is the current displayed image in V |