Unofficial file dialog for CustomTkinter.
Download and place the CTkFileDialog folder into your script folder.
dialog = CTkFileDialog()
if dialog.path:
print(dialog.path)
dialog = CTkFileDialog(save=True)
if dialog.path:
print(dialog.path)
Argument | Description |
---|---|
width | dialog window width |
height | dialog window height |
hidden_files | False (by default) or True |
initialdir | initial dir |
title | dialog window title |
save | save=False if open file (by default), save=True if save file |
save_extension | Save extension, for example, save_extension=".txt" |
A widget that can be added to an existing window.
def my_command():
print(filewidget.path)
filewidget = CTkFileWidget(root, command=my_command)
filewidget.pack(padx=10, pady=10)
Argument | Description |
---|---|
master | master, required |
command | the command that will be executed when you click "OK" |
All of CTkFileDialog | except title |
- Brushshe: fully functional painting app written in CustomTkinter