def complete(self, text=_('Complete'), show_time=2):
"""
Sets the progress to 100%, hides the button(s) and automatically
closes the popup.
.. versionchanged:: 0.2.1
Added parameters 'text' and 'show_time'
:param text: text instead of 'Complete', optional
:param show_time: time-to-close (in seconds), optional
"""
self._complete = True
n = self.max
self.value = n
self.text = text
self.buttons = []
Clock.schedule_once(self.dismiss, show_time)
评论列表
文章目录