Where's SetValue() in AnalogClock?

I must be missing something. I can't see how to set the current time in
AnalogClock, or how to stop it from ticking. I see this in
wx/lib/analogclock/helpers.py:

    def _draw(self, dc, shadow=False):
            ends = [int(x) for x in strftime("%I %M %S",
      localtime()).split()]

Shouldn't that call something like self.parent.GetTime() instead of
localtime()?

--Noel

noel@natnix.com wrote:

I must be missing something. I can't see how to set the current time in
AnalogClock, or how to stop it from ticking. I see this in
wx/lib/analogclock/helpers.py:

    def _draw(self, dc, shadow=False):
            ends = [int(x) for x in strftime("%I %M %S",
      localtime()).split()]

Shouldn't that call something like self.parent.GetTime() instead of
localtime()?

It appears that the widget was designed to just display the current time according to the system clock. If there is a compelling reason to allow it to display other times, or to be stopped, then I'm sure a patch could be discussed.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Yes, I think that a clock control is useless without the ability to set
the displayed value, and to not have the value change one second after it was
set. I'd say it needs setDate()/getDate() methods, just like the
CalendarCtrl and TimeCtrl.

It's a nice looking control. I look forward to using it!

--Noel

···

On Thu, Jun 29, 2006 at 09:12:19AM -0700, Robin Dunn wrote:

It appears that the widget was designed to just display the current time
according to the system clock. If there is a compelling reason to allow
it to display other times, or to be stopped, then I'm sure a patch could
be discussed.