GefTextFormat.SetFormatToText (method)

Sets the format to be used for the TextExpression display.
Syntax: Boolean = object.SetFormatToText ( MaxWidth )
Optional MaxWidth As long -
Description: The SetFormatToText method sets the display format to display the value as text. The parameters correspond to the fields in the Text property page.


Sub GefTextFormat_SetFormatToText()
    Dim oCimObj As GefObject
    Dim oCimTxtFmt As GefTextFormat
    Set oCimObj = CimGetObject
    Set oCimTxtFmt = oCimObj.TextFormat
    If Not oCimTxtFmt Is Nothing Then
        oCimTxtFmt.TextExpression = "$Project.Computer"
        CimGetScreen.Refresh False
        If oCimTxtFmt.SetFormatToText(5) = True Then
            MsgBox "The value is now being displayed as text"
        End If
        MsgBox "The object does not have any text to format"
    End If
End Sub