xbmcgui.py 文件源码

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

项目:xbmctopython 作者: pybquillast 项目源码 文件源码
def yesno(self, heading, line1, line2=None, line3=None, nolabel=None, yeslabel=None):
        """Show a dialog 'YES/NO'.

        heading: string or unicode - dialog heading.
        line1: string or unicode - line #1 text.
        line2: string or unicode - line #2 text.
        line3: string or unicode - line #3 text.
        nolabel: label to put on the no button.
        yeslabel: label to put on the yes button.

        Note:
            Returns True if 'Yes' was pressed, else False.

        Example:
            dialog = xbmcgui.Dialog()
            ret = dialog.yesno('XBMC', 'Do you want to exit this script?')
        """
        root = self.root
        prompt = [elem for elem in [line1, line2, line3] if elem]
        message = '\n'.join(prompt)
        ans = tkMessageBox.askyesno(heading, message, parent=root)
        root.destroy()
        return ans[0]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号