GefTextFormat.SetFormatToInteger (method)

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


Sub GefTextFormat_SetFormatToInteger()
    Dim oCimObj As GefObject
    Dim oCimTxtFmt As GefTextFormat
    Set oCimObj = CimGetObject
    Set oCimTxtFmt = oCimObj.TextFormat
    oCimTxtFmt.TextExpression ="$Project.Devices"
    CimGetScreen.Refresh False
    If oCimTxtFmt.SetFormatToInteger(True, 4) = True Then
        MsgBox "The Value is now being displayed as an integer"
    End If
End Sub