GefTextFormat.GetCustomFormat (method)

Gets the format parameters being used for the TextExpression display.
Syntax: Boolean = object.GetCustomFormat ( CustomFormat )
CustomFormat As VARIANT* -
Description: The GetCustomFormat method gets the display format if it is configured to a custom format. The parameters correspond to the fields in the Text property page.


Sub GefTextFormat_GetCustomFormat()
    Dim oCimObj As GefObject
    Dim oCimTxtFmt As GefTextFormat
    Dim nCustomFmt As Variant
    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"
            If oCimTxtFmt.GetCustomFormat(nCustomFmt) = True Then
                MsgBox "The custom format is using " & """" & nCustomFmt & """" & _
                    " as it's format"
            End If
        End If
        MsgBox "The object does not have any text to format"
    End If
End Sub