GefTextFormat.SetFormatToCustom (method)

Sets the format to be used for the TextExpression display.
Syntax: Boolean = object.SetFormatToCustom ( CustomFormat )
CustomFormat As String -
Description: The SetFormatToCustom method formats the point's display value to a user defined format. The parameters correspond to the fields in the Text property page.


Sub GefTextFormat_SetFormatToCustom()
    Dim oCimObj As GefObject
    Dim oCimTxtFmt As GefTextFormat
    Set oCimObj = CimGetObject
    Set oCimTxtFmt = oCimObj.TextFormat
    If Not oCimTxtFmt Is Nothing Then
        oCimTxtFmt.TextExpression = "$Project.DateTime"
        CimGetScreen.Refresh False
        If oCimTxtFmt.SetFormatToCustom("%d Time") = True Then
            CimGetScreen.Refresh False
            MsgBox "The value is now being displayed using a custom format"
        End If
        MsgBox "The object does not have any text to format"
    End If
End Sub