HoursEntry

Description:

Displays a time editing field.

Returns:

A positive, numeric value

Usage:

Steady State only.

Function Groups:

Graphics, Time and Date

Format:

\HoursEntry(Left, Top, Hours, Minutes, Enable, TimeChange, Trigger, FocusID)

Related to:  
Parameters:

 

Left
Required. Left reference
Top
Required. Right reference
Hours
Required. Output hours value. Displayed as a 12-hour clock (with AM and PM in the selector) but varies from 0 to 23.
Minutes
Output minute value. Varies from 0 to 59.
Enable
Required Boolean. Set TRUE to enable, or FALSE to display the selector as a grayed-out control.
TimeChange
Optional Boolean. Will be set TRUE when the operator changes the hour or minute value. If provided, this parameter should be initialized to FALSE.
Trigger
An optional numeric value. Will be set to the status of the underlying edit field.
FocusID
Optional. Any numeric expression from 0 to 32767. Defaults to 1 if not set.
Comments:

This module displays a time selector at the given top, left coordinates. Values are returned in the 3rd and 4th parameters when the user selects a value.

Example:

[
  Title = "Page 1";
  Left = 100;
  Top  = 100;
  Hours = 14;
  Minutes = 44;
  Enable = TRUE;
  TimeChange = FALSE;
  Trigger = 1;
  ID = 1;
]

Main [
  Return(Self);
  \HoursEntry(Left, Top, Hours, Minutes, Enable, TimeChange);
  ZText(100,200,Concat(Hours,":",Minutes, " - ", TimeChange),5, 0);
]