本文整理汇总了Python中tkinter.Toplevel.iconbitmap方法的典型用法代码示例。如果您正苦于以下问题:Python Toplevel.iconbitmap方法的具体用法?Python Toplevel.iconbitmap怎么用?Python Toplevel.iconbitmap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tkinter.Toplevel
的用法示例。
在下文中一共展示了Toplevel.iconbitmap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __about
# 需要导入模块: from tkinter import Toplevel [as 别名]
# 或者: from tkinter.Toplevel import iconbitmap [as 别名]
def __about(self):
'''
None -> None
Associated with the Help Menu.
Creates a new window with the "About" information
'''
appversion = "1.6"
appname = "EXCEL to KML Transformer"
copyright = 14 * ' ' + '(c) 2013' + 12 * ' ' + \
'SDATO - DP - UAF - GNR\n' + 34 * ' '\
+ "All Rights Reserved"
licence = 18 * ' ' + 'http://opensource.org/licenses/GPL-3.0\n'
contactname = "Nuno Venâncio"
contactphone = "(00351) 969 564 906"
contactemail = "[email protected]"
message = "Version: " + appversion + 5 * "\n"
message0 = "Copyright: " + copyright + "\n" + "Licença: " + licence
message1 = contactname + '\n' + contactphone + '\n' + contactemail
icons = os.getcwd() + os.sep + "icons" + os.sep # path to icons
icon = icons + "compass.ico"
tl = Toplevel(self.master)
tl.configure(borderwidth=5)
tl.title("Sobre...")
tl.iconbitmap(icon)
tl.resizable(width=FALSE, height=FALSE)
f1 = Frame(tl, borderwidth=2, relief=SUNKEN, bg="gray25")
f1.pack(side=TOP, expand=TRUE, fill=BOTH)
l0 = Label(f1, text=appname, fg="white", bg="gray25",
font=('courier', 16, 'bold'))
l0.grid(row=0, column=0, sticky=W, padx=10, pady=5)
l1 = Label(f1, text=message, justify=CENTER,
fg="white", bg="gray25")
l1.grid(row=2, column=0, sticky=E, columnspan=3, padx=10, pady=0)
l2 = Label(f1, text=message0,
justify=LEFT, fg="white", bg="gray25")
l2.grid(row=6, column=0, columnspan=2, sticky=W, padx=10, pady=0)
l3 = Label(f1, text=message1,
justify=CENTER, fg="white", bg="gray25")
l3.grid(row=7, column=0, columnspan=2, padx=10, pady=0)
button = Button(tl, text="Ok", command=tl.destroy, width=10)
button.pack(pady=5)