GefTextFormat.AlignmentAnchor (property)

Gets and sets the anchor alignment.
Syntax: GefAnchorEnum = object.AlignmentAnchor
object.AlignmentAnchor = GefAnchorEnum
Description: The AlignmentAnchor property gets and sets the anchor position used for alignment of the text object.

Example:

Sub GefTextFormat_AlignmentAnchor()
    
    Dim oCimObj As GefObject
    Dim oCimTxtFmt As GefTextFormat
    Dim oCimExecCond As GefExecutionCondition
    
    Set oCimObj = CimGetObject
    Set oCimTxtFmt = oCimObj.TextFormat
    If Not oCimTxtFmt Is Nothing Then
        oCimTxtFmt.AlignmentAnchor = gefCenter
        CimGetScreen.Refresh False
        Select Case oCimTxtFmt.AlignmentAnchor
            Case gefAnchorMixedValue
                MsgBox "The alignment anchor is unknown"
            Case gefBottomCenter
                MsgBox "The alignment anchor is in the center on the bottom"
            Case gefBottomLeft
                MsgBox "The alignment anchor is in the left on the bottom"
            Case gefBottomRight
                MsgBox "The alignment anchor is in the right on the bottom"
            Case gefCenter
                MsgBox "The alignment anchor is in the center"
            Case gefMiddleLeft
                MsgBox "The alignment anchor is in the middle on the left"
            Case gefMiddleRight
                MsgBox "The alignment anchor is in the middle on the right"
            Case gefTopCenter
                MsgBox "The alignment anchor is in the center on the top"
            Case gefTopLeft
                MsgBox "The alignment anchor is in the left on the top"
            Case gefTopRight
                MsgBox "The alignment anchor is in the right on the top"
        End Select
    End If
    
End Sub