Gets the format parameters being used for the TextExpression display. | |
Syntax: | Boolean = object.GetTextFormat ( MaxWidth ) |
Parameters: |
MaxWidth As
VARIANT* -
|
Description: | The GetTextFormat method gets the display
format if it is configured to display text. The parameters
correspond to the fields in the Text property page. Example: Sub GefTextFormat_GetTextFormat() Dim oCimObj As GefObject Dim oCimTxtFmt As
GefTextFormat Dim nMaxWidth As Variant 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 CimGetScreen.Refresh
False MsgBox
"The value is now being displayed as text" If
oCimTxtFmt.GetTextFormat(nMaxWidth) = True Then MsgBox
"The format is displayed as text with a maximum width of " &
nMaxWidth End
If End
If Else MsgBox "The
object does not have any text to format" End If End Sub |