Example #1
0
 def __init__(self, position, seconds_to_run=10):
     Control.__init__(self, NSText.alloc().init())
     self.ns_control.setString_("00:00")
     self.set_font(Font('Arial', 14))
     self.ns_control.setEditable_(0)
     self.ns_control.sizeToFit()
     self.ns_control.setFrameOrigin_((position.x, position.y))
     self.ns_control.setFrameSize_((48, 10))
     self._timer = None
     self._seconds = 0
     self._clients = []
     self.secondsToRun = seconds_to_run
Example #2
0
 def __init__(self, position, size):
     Control.__init__(self, NSText.alloc().initWithFrame_(((position.x, position.y), (size.width, size.height))))
     self.ns_control.setEditable_(0)