Displaying digital time with seconds in a different colour

I prefer to display the H:M:S digital time with the seconds having a different colour from the hours and minutes. This can easily be done by having two digital time elements, with one having a text specification of #Db#:#DmZ#: and the other #DUsZ#

This requires the left hand element (hrs, mins) to be right justified and the right element (secs) to be left justified, though that has the disadvantage that it is not possible to centrally justify the combined time display.

I’ve already found one solution, which was to have two sets of times - one for times with single-digit hour values and another for double-digit hour values. Each set was then manually centred.

However, is there an easier way? I wondered if it was possible to put my two digital time elements into a container that can be given a justification setting independent of its contents.

You would need some kind of grouping feature with common properties adjustable for such group. This is not possible on Facer.
Other two ways would be
either to split the time even further and center each on its own,
or simply find suitable font with fixed width of digits.
And finally you could make formula for the x-coordinate of the time text fields, that would shift them around, depending of how many digits they contain.

2 Likes

Sadly, you have confirmed my feeling that a container-based solution is unavailable in Facer.

Thanks for your alternative suggestions, but they don’t appear to address the issue of the width changing when the hours value moves from one to two digits. My existing solution is designed to handle that and it works very well.

There are many fixed width fonts available and in combination with leading zero tags should resolve your problem. Another solution would be to use images of the numbers - if this method appeals to you it has been discussed here in the community you just need to search…

2 Likes

The easiest way is to put your time in eight separate elements. One for each digit and both colons. You can do this using this:

Hours:
(0-2) (floor(#Db#/10))
(0-9) (#Db#%10)

Minute:
(0-5) (floor(#Dm#/10))
(0-9) (#Dm#%10)

Seconds:
(0-5) (floor(#Ds#/10))
(0-9) (#Ds#%10)

3 Likes