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:
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.
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.