Page 1 of 1
Change the look and feel of the "Clock" widget?
Posted: Sat Dec 31, 2016 7:39 pm
by Xacto
Is there a way to change the look and feel of the clock face widget in live code?
Re: Change the look and feel of the "Clock" widget?
Posted: Sun Jan 01, 2017 3:00 pm
by bn
Hi Xacto,
to change the Clock Widget you would have to change the "clock.lcb" file using Livecode Builder language. The look and feel is coded there.
Here is a Livecode Script Clock that may be easier to tweak.
http://forums.livecode.com/viewtopic.ph ... ock#p84736
Kind regards
Bernd
Re: Change the look and feel of the "Clock" widget?
Posted: Sun Jan 01, 2017 9:38 pm
by bn
Hi Xacto,
may be you tell us what you want to change in the clock widget and we can tell you how hard it is to change that.
the Livecode Script Clock I indicated above is also in the sample stacks, it has some more features you can change.
http://livecodeshare.runrev.com/stack/749/Clock
Kind regards
Bernd
Re: Change the look and feel of the "Clock" widget?
Posted: Mon Jan 02, 2017 2:20 am
by Xacto
The stack and code that you provided is exactly what I was looking for. Thank you!!
I will dig in and see if I can make it work.
Cheers.

Re: Change the look and feel of the "Clock" widget?
Posted: Mon Jan 02, 2017 11:30 am
by bn
Hi Xacto,
glad it helped. If you get stuck modifying the clock just ask.
here is another clock, a swiss railway clock, technically a little trickier than the other clock.
Kind regards
Bernd
Re: Change the look and feel of the "Clock" widget?
Posted: Wed Jan 04, 2017 5:53 am
by Xacto
These are perfect - thank you so much for sharing.
Quick question... is there a way to use SVG or PNG's graphics for the hands instead of line graphics?
Re: Change the look and feel of the "Clock" widget?
Posted: Wed Jan 04, 2017 10:31 am
by bn
Quick question... is there a way to use SVG or PNG's graphics for the hands instead of line graphics?
unfortunately not. Livecode script does not know anything about SVG, only Livecode Builder. It would be much easier to do with SVGs and cleaner too. That is the reason for the clock widget to show the power of SVGs.
You could use PNGs but it would not be as smooth as using Livecode Script graphics since PNGs are bitmapped images. Turning bitmapped images at arbitrary degrees leads to artifacts since they have to be recalculated.
Kind regards
Bernd