GefTextFormat.SetFormatToReal (method)

Sets the format to be used for the TextExpression display.
Syntax: Boolean = object.SetFormatToReal ( Precision, ZeroFilled, Width, ScientificNotation )
Optional Precision As long -
Optional ZeroFilled As Boolean -
Optional Width As long -
Optional ScientificNotation As Boolean -
Description: The SetFormatToReal method sets the display format to display a real datatype value. The parameters correspond to the fields in the Text property page.


Sub GefTextFormat_SetFormatToReal()
    Dim oCimObj As GefObject
    Dim oCimTxtFmt As GefTextFormat
    Set oCimObj = CimGetObject
    Set oCimTxtFmt = oCimObj.TextFormat
    oCimTxtFmt.TextExpression ="$Project.Devices"
    CimGetScreen.Refresh False
    If oCimTxtFmt.SetFormatToReal(1, True, 4, False) = True Then
        MsgBox "The value is now being displayed as a real value"
    End If
End Sub