piemenu.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:cebl 作者: idfah 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号