tkFileDialog.askopenfilename
Sonia Rovner
srovner at us.ibm.com
Thu Mar 4 20:49:47 EST 2004
Peter Otten <__peter__ at web.de> wrote in message news:<c28115$pqp$07$1 at news.t-online.com>...
> Sonia Rovner wrote:
>
> > tkFileDialog.askopenfilename only allows you to open an existing file.
> > I want to allow my users to enter a new filename in the dialog box.
> > Can anyone help?
>
> Seems you are out of luck:
>
> "The procedures tk_getOpenFile and tk_getSaveFile pop up a dialog box for
> the user to select a file to open or save. The tk_getOpenFile command is
> usually associated with the Open command in the File menu. Its purpose is
> for the user to select an existing file only. If the user enters an
> non-existent file, the dialog box gives the user an error prompt and
> requires the user to give an alternative selection. If an application
> allows the user to create new files, it should do so by providing a
> separate New menu command. "
>
> Quoted from http://www.tcl.tk/man/tcl8.5/TkCmd/getOpenFile.htm
>
> Peter
Thank you very much.
Sonia
More information about the Python-list
mailing list