Date and time
The clock shows the operator computer’s time — as digits in a given format (HH:mm:ss, dd.MM.yyyy or both) or with hands, including a second hand. Font, colors, background and border are set up like for text.
Properties
Section titled “Properties”Besides the properties of every element — name, position, size, tooltip, rotation, transparency and the operate right:
| Property | Values | Default | Description |
|---|---|---|---|
Style |
Digital, Analog |
Digital |
View. Digital or analog |
Format |
text | dd.MM.yyyy HH:mm:ss |
Format. What to show: time, date or both |
ShowSeconds |
true / false |
true |
Second hand. For analog clock |
HandColor |
#RRGGBB |
Hands color. For analog clock; empty — text color | |
FontFamily |
text | Font. Windows font name: Segoe UI, Arial, Consolas, Tahoma; empty — default | |
FontSize |
number | 16 |
Font size |
Bold |
true / false |
false |
Bold |
Italic |
true / false |
false |
Italic |
Underline |
true / false |
false |
Underlined |
Foreground |
#RRGGBB |
#1E2328 |
Text color. Empty — default |
Alignment |
Left, Center, Right |
Left |
Alignment |
VerticalAlignment |
Top, Center, Bottom |
Center |
Vertically |
Background |
#RRGGBB |
Background. Empty — default | |
BackgroundStyle |
Solid, VerticalGradient, HorizontalGradient, Transparent |
Solid |
Background fill. Solid, gradient (3D) or transparent |
Background2 |
#RRGGBB |
Second background color. For gradient; empty — lighter than background | |
BorderColor |
#RRGGBB |
Border color. Empty — default | |
BorderWidth |
number | 0 |
Border width. 0 — no border |
BorderStyle |
Solid, Dash, Dot, DashDot |
Solid |
Border style |
CornerRadius |
number | 0 |
Corner radius |
Padding |
number | Padding. From border to text; empty — default | |
Shadow |
true / false |
false |
Shadow |
FlashBackground |
true / false |
false |
Flash background. Background alternates with the flash color; to switch by tag — use property animation |
FlashBackgroundColor |
#RRGGBB |
#D32F2F |
Background flash color |
FlashForeground |
true / false |
false |
Flash text |
FlashForegroundColor |
#RRGGBB |
#FFFFFF |
Text flash color |
FlashRate |
Slow, Medium, Fast |
Medium |
Flash rate |
From scripts
Section titled “From scripts”Item.Type = Clock. Any property is read and changed by name: Item.HandColor = "#D32F2F". The common element members (Visible, Enabled, Value, Raise, Apply…) are described in Elements from scripts.
Events
Section titled “Events”Mouse, hover, focus and keyboard — as for any element (see Events and functions).
Examples
Section titled “Examples”Only the time in a narrow spot of the screen.
Screen.Items("Clock").Format = "HH:mm";An analog clock in the evening, digital by day — the screen’s Cycle event script.
var hour = new Date().getHours();Screen.Items("Clock").Style = hour >= 18 || hour < 7 ? "Analog" : "Digital";