[英]Python tkinter change 'open' in the title bar
I would like to change the part of the title bar that say's 'open' below in the tkinter window-- see the root.title("Old file selected first") below: 我想在tkinter窗口中更改下面标题为'open'的标题栏部分 - 请参阅下面的root.title(“首先选择旧文件”):
Here is part of my code:
这是我的代码的一部分:
import Tkinter as tk
import tkFileDialog
root = tk.Tk()
root.title("Old file selected first") # what i would like to appear instead of 'Open'
root.withdraw()
old_file = tkFileDialog.askopenfilename(filetypes=[('.csvfiles', '.csv')])
You don't even need the other tk main app running, unless you want to hide the tkinter default box that pops up. 您甚至不需要运行其他tk主应用程序,除非您想要隐藏弹出的tkinter默认框。
import tkFileDialog
old_file = tkFileDialog.askopenfilename(filetypes=[('.csvfiles', '.csv')],
title='Old file selected first')
See here for more details: http://tkinter.unpythonic.net/wiki/tkFileDialog 有关更多详细信息,请参见此处: http : //tkinter.unpythonic.net/wiki/tkFileDialog
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.