def highlight(self, choice, style='pop', secs=None, refresh=True):
"""Turn on a highlight for a given cell.
Args:
choice: Name of cell where highlight should be
turned on.
style: String describing the type of highlight.
Current possible values are 'jump' or
'pop'.
secs: Floating point seconds until the
highlight should be turned off. If
None, highlight will be left on until
manually cleared.
"""
if style.lower() == 'pop':
self.highlightPop.add(choice)
elif style.lower() == 'jump':
self.highlightJump.add(choice)
else:
raise Exception('Unknown highlight style %s.' % style)
if refresh:
self.refresh()
if secs != None:
wx.CallLater(1000.0*secs, self.clearHighlight, choice=choice, refresh=refresh)
评论列表
文章目录