The function %HI_SelectTimeDialog shows a dialog box for defining a time interval.
Declaration
BOOL %HI_SelectTimeDialog(
TIME in out StartTime,
TIME in out EndTime := (invalid),
BOOL in bStrongInequality := true,
BOOL in bShowHours := true,
BOOL in bReadOnlyHours := false,
INT in x := -1,
INT in y := -1
)
Parameters
StartTime
Begin time of interval.
EndTime
End time of interval.
bStrongInequality
Possible values:
@TRUE - time interval returned by the function is to be StartTime≤interval<EndTime
@FALSE - time interval returned by the function is to be StartTime≤interval≤EndTime
bShowHours
Allows to show time data (hours and minutes) in the dialog box:
@TRUE - show time data
@FALSE - hide time data
bReadOnlyHours
Allows to change time data (to edit hours and minutes):
@TRUE - disable time data changes
@FALSE - enable time data changes
x, y
Position of the dialog box on monitor.
Return value
TRUE - if user closed the dialog box by clicking the button OK. FALSE - if user closed the dialog box by clicking the button Cancel.
Note
User selects e.g. the entire day of January 1st 2005:
if bStrongInequality=TRUE, then StartTime=1.1.2005 00:00:00.000 and EndTime=1.1.2005 23:59:59.999
if bStrongInequality=FALSE, then StartTime=1.1.2005 00:00:00.000 and EndTime=2.1.2005 00:00:00.000
Example
TIME _bt
TIME _et
BOOL _res
INT _i
_i := 1
_bt := _i\TIM
_et := %AddTime(_bt, 3600*10)
_res := %HI_SelectTimeDialog(_bt, _et, @FALSE, @TRUE, @FALSE)
IF _res THEN
_tmA := _bt
_tmA2 := _et
ENDIF
0 komentárov