Sets the format to be used for the TextExpression display. | |
Syntax: | Boolean = object.GetTimeRelative ( TimeFormat ) |
Parameters: |
TimeFormat
As VARIANT* -
|
Description: | The GetTimeRelative method gets the display
format if it is configured to display time. The parameters
correspond to the fields in the Text property page. Example: Sub GefTextFormat_GetTimeRelative() Dim oCimObj As GefObject Dim oCimTxtFmt As
GefTextFormat Dim nTimeFmt As Variant Set oCimObj = CimGetObject Set oCimTxtFmt =
oCimObj.TextFormat If Not oCimTxtFmt Is Nothing
Then oCimTxtFmt.TextExpression
= "$Project.DateTime" CimGetScreen.Refresh
False If
oCimTxtFmt.SetFormatToTimeRelative(gefTimeHH_MM_SS) = True
Then CimGetScreen.Refresh
False MsgBox
"The value is now being displayed as relative time" If
oCimTxtFmt.GetTimeRelative(nTimeFmt) = True Then Select
Case nTimeFmt Case
gefTimeFormatMixed MsgBox
"The time format is unknown" Case
gefTimeDD_HH_MM_SS MsgBox
"The time format is Day Hour Minute Seconds" Case
gefTimeHH_tenths MsgBox
"The time format is in tenths of an hour" Case
gefTimeHH_MM_SS MsgBox
"The time format is Hour Minute Seconds" Case
gefTimeMM_tenths MsgBox
"The time format is in tenths of a minute" Case
gefTimeMM_SS MsgBox
"The time format is Minutes Seconds" End
Select End
If End
If Else MsgBox "The
object does not have any text to format" End If End Sub |