Alignment Property

Measurement Studio User Interface

Alignment Property

Syntax

CWCaption.Alignment

Data Type

CWAlignments

You can use the following constants with this data type:

  • cwuiBottomCenter–Bottom-center align.
  • cwuiBottomLeft–Bottom-left align.
  • cwuiBottomRight–Bottom-right align.
  • cwuiCenter–Center.
  • cwuiLeftJustify–Left align.
  • cwuiRightJustify–Right align.
  • cwuiTopCenter–Top-center align.
  • cwuiTopLeft–Top-left align.
  • cwuiTopRight–Top-right align.

Purpose

Specifies the alignment of the caption relative to CWCaption.XCoordinate and CWCaption.YCoordinate properties.

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

See Also

CWCaption.XCoordinate

CWCaption.YCoordinate