Text Property

Measurement Studio User Interface

Text Property

Syntax

CWCaption.Text

Data Type

String

Purpose

Specifies the text of the caption.

Example

'Mark the plot with a bold-cross point at (10,5)
CWGraph1.Annotations.Add
CWGraph1.Annotations.Item(1).Shape.Type = cwShapePoint
CWGraph1.Annotations.Item(1).Shape.PointStyle = cwPointBoldCross
'Specify the coordinates of the point
CWGraph1.Annotations.Item(1).XCoordinates = Array(10)
CWGraph1.Annotations.Item(1).YCoordinates = Array(5)
'Add a caption with the text "Peak"
CWGraph1.Annotations.Item(1).Caption.Text = "Peak"
'Position the caption above the point at (10,6)
CWGraph1.Annotations.Item(1).Caption.XCoordinate = 10
CWGraph1.Annotations.Item(1).Caption.YCoordinate = 6
'Align the caption so that the bottom-right corner of the caption appears at (10,6)
CWGraph1.Annotations.Item(1).Caption.Alignment = cwuiBottomRight