Digital Clock Component
The digital clock component can display date and time information in various formats which can be completely customized. The font and color are completely configurable as well as many other visual attributes. The time information can come from one of several sources including the system time in UTC (GMT). The time data can also be scaled to read many types of formats providing a universal clock for real-time or simple display functions.
Properties
NAME | TYPE | R/W | DESCRIPTION |
---|---|---|---|
Anchors | Anchor Class | R/W | Provides a means to lock parts of the display when used in containers (fixes where it appears). |
BorderColor | Color | R/W | Sets the border color (BorderWidth must be greater than 0 for the border to display). |
BorderWidth | Integer | R/W | Width in pixels of the border (0 = no border) |
ClockMode | Enumeration | R/W | Sets the operating mode of the clock. |
Color | Color | R/W | Controls the background color of the control. |
ControlHeight | Integer | R/W | Adjusts the control's height. |
ControlLeft | Integer | R/W | Adjusts the control's left side location (0 = display left side). |
ControlTop | Integer | R/W | Adjusts the control's top side location (0 = display top side). |
ControlWidth | Integer | R/W | Adjusts the control's width. |
DisabledText | String | R/W | Text to display when the clock component is disabled |
FontBold | Boolean | R/W | Font bold attribute. |
FontColor | Color | R/W | Clock text color. |
FontFamily | String | R/W | Name of the font to use for the text. |
FontItalic | Boolean | R/W | Font italic attribute. |
FontSize | Integer | R/W | Font size in points (e.g. 12 = 12 pt.) |
FormatString | String | R/W | Format string for the date and time data (see below for details) |
Hold | Boolean | R/W | Holds the current date time when true (locks the current display) |
LinkGUID | GUID | R/W | GUID of the server object that holds the link properties (See Component Linking for more details). |
LinkPropertyHold | String | R/W | The name of the server or local property that links to this component's Hold property (See Component Linking for more details). |
LinkPropertyReset | String | R/W | The name of the server or local property that links to this component's Reset property (See Component Linking for more details) |
LinkPropertySync | String | R/W | The name of the server or local property that links to this component's Sync property (See Component Linking for more details) |
LinkPropertyTime | String | R/W | The name of the server or local property that links to this component's Time property (See Component Linking for more details). |
Margins | Enumeration | R/W | Allows adjusting the margins between the border and the text (all margins default to 3 pixels). |
Name | String | R/W | The component's unique name (must be unique within a page) |
OfflineText | String | R/W | Text to display if the link between the server and the display client are closed. |
Padding | Integer | R/W | Number of pixels to pad between the component's outer dimensions and the border. |
ParentFont | Boolean | R/W | |
Reset | Boolean | R/W | Resets the time when it is free running (i.e. not tied to an absolute source) |
ServerGUID | GUID | R/W | The GUID of the remote server used for linking to server object properties (See Component Linking for more details). |
StateGlobal | Unsigned 32 Bit Integer | R/W | Used for carrying the global state of the component. See Attribute Linking for more information. This property has no effect on the control but can be used for keeping track of what might have changed it. |
Synchronize | String | R/W | When the ClockMode property is set to External Sync, setting this value will reset the running time to the same value. |
TextAlign | Enumeration | R/W | Determines where the date time text will be displayed inside of the control (9 choices) |
Time | String | R/W | The current date / time value. Setting this value will set any linked writable value to that date and time. |
TimeScale | Enumeration | R/W | The component uses the default parent font when true. |
TimeZoneOffset | Double | R/W | Number of hours offset by time zone from GMT |
WordWrap | Boolean | R/W | Wraps the displayed text to fit the control if true. If false, the text is forced to one line. |
Date Time Format Strings
The Date / Time format is controlled by the FormatString property. The table below shows the various options for formatting the date and time data. For example to display the date and time with UTC indication the format string value would be "yyyy.mm.dd hh:nn:ss' UTC'". This will display something like "2020.06.15 12:15:37 UTC". By combining combinations of the format strings, virtually any format can be created.
SPECIFIER | DISPLAYS |
---|---|
c | Displays the date using a short format in the format "month/day/year hour:minutes:seconds am-pm" |
d | Displays the day as a number without a leading zero (1-31). |
dd | Displays the day as a number with a leading zero (01-31). |
ddd | Displays the day as an abbreviation (Sun-Sat). |
dddd | Displays the day as a full name (Sunday-Saturday). |
ddddd | Displays the date component of the date-time as "month/day/year" (condensed date) |
dddddd | Displays the date component of the date-time as "Day Name, Month Name, day, full year" (verbose date) |
m | Displays the month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed. |
mm | Displays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed. |
mmm | Displays the month as an abbreviation (Jan-Dec). |
mmmm | Displays the month as a full name (January-December) |
yy | Displays the year as a two-digit number (00-99). |
yyyy | Displays the year as a four-digit number (0000-9999). |
h | Displays the hour without a leading zero (0-23). |
hh | Displays the hour with a leading zero (00-23). |
n | Displays the minute without a leading zero (0-59). |
nn | Displays the minute with a leading zero (00-59). |
s | Displays the second without a leading zero (0-59). |
ss | Displays the second with a leading zero (00-59). |
t | Displays the time component of the date-time as "hour:minutes AM/PM" (hours have no leading zero). |
tt | Displays the time component of the date-time as "hour:minutes:seconds AM/PM" (hours have no leading zero). |
am/pm | Uses the 12-hour clock for the preceding h or hh specifier, and displays 'am' for any hour before noon, and 'pm' for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly. |
a/p | Uses the 12-hour clock for the preceding h or hh specifier, and displays 'a' for any hour before noon, and 'p' for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly. |
. (period) | Displays the "." (period) character as a separator between values (e.g. 2020.07.15). |
/ (slash) | Displays the "/" (slash) character as a separator between date values (e.g. 7/15/2020). |
: (colon) | Displays the ":" (colon) character as a separator between time values (e.g. 8:45). |
'xxx', "xxx" | Characters enclosed in single or double quotes are displayed "as is" and do not affect formatting. |