def ok(self, heading, line1, line2=None, line3=None):
"""Show a dialog 'OK'.
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.
Note:
Returns True if 'Ok' was pressed, else False.
Example:
dialog = xbmcgui.Dialog()
ok = dialog.ok('XBMC', 'There was an error.')
"""
root = self.root
prompt = [elem for elem in [line1, line2, line3] if elem]
message = '\n'.join(prompt)
tkMessageBox.showinfo(heading, message, parent=root)
root.destroy()
return True
评论列表
文章目录