12/24 time Thread last updated on 2004-06-26 13:51:03

Posted by member 46329 on 2004-06-26 13:20:38

I have got my time set up with Label, its set to a 12 hour clock and when i click on it, it changes to 24 hours.

How do I make it so you can click on it again to switch it back?!

I understand it requires an IF command since I cannot find a command to toggle between two lots of text, but im not sure what to enter.

Thanks

Posted by member 46329 on 2004-06-26 13:27:13 link

The best thing i've managed to do is

;TimeLabelOnMouseEnter !TimeLabelSetText "[time('ii:nn:ss')]"
;TimeLabelOnMouseLeave !TimeLabelSetText "[time('h:nn am/pm',)]"

Which changes it to 24 hour with left mouse button and back to 12 hour with the left mouse button.

But is there a way to toggle it with the same left button?

Posted by member 37809 on 2004-06-26 13:27:52 link

An easy solution is to use the label-1.99 feature where you can specify multiple formats for a LabelText. You could bind !LabelNext to the onLeftClick and onLeftDoubleClick events.

Posted by member 46329 on 2004-06-26 13:51:03 link

Ah! Thanks, I thought there should be an easy way!

Oh and I copied n pasted wrong bit lol!
was suposed to be

TimeLabelOnLeftClick !TimeLabelSetText "[time('ii:nn:ss')]"
TimeLabelOnRightClick !TimeLabelSetText "[time('h:nn am/pm',)]"

Thanks for your help.