List Info

Thread: FileDialog default directory reset to current directory




FileDialog default directory reset to current directory
user name
2007-02-24 11:27:58
On GTK using the wx.FileDialog in wx.SAVE mode, it seems
that the
defaultDir is ignored and set to the current directory if
the
defaultFile is set to non-empty string.  E.g. this

        dlg = wx.FileDialog(
            self, message="Save file as ...",
defaultDir="/tmp",
            defaultFile="blah", wildcard=wildcard,
style=wx.SAVE
            )

results in the dialog showing the current directory, but
this:

        dlg = wx.FileDialog(
            self, message="Save file as ...",
defaultDir="/tmp",
            defaultFile="", wildcard=wildcard,
style=wx.SAVE
            )

will show the dialog in the /tmp directory.

I did find it could be worked around by following the dialog
creation with:

dlg.SetDirectory("/tmp")

Rob

------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-dev-unsubscribelists.wxwidgets.org
For additional commands, e-mail: wxPython-dev-helplists.wxwidgets.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )