By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,095 Members | 1,586 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,095 IT Pros & Developers. It's quick & easy.

[wxpython] exclude files in a wx.FileDialog?

P: n/a
Hello,

Is it possible to exclude certain files in a wx.FileDialog, so that the user
won't see them and can't select them with the mouse in de File open window?

I was thinking of somehow extending the class FileDialog(Dialog)
in the wx module _windows.py to a subclass, but I'm not sure how to do that
(if feasible).
cheers
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 18 Jan 2005 13:23:24 GMT, John Field <th**@is.invalid> wrote:
Hello,

Is it possible to exclude certain files in a wx.FileDialog, so that the user
won't see them and can't select them with the mouse in de File open window?

I was thinking of somehow extending the class FileDialog(Dialog)
in the wx module _windows.py to a subclass, but I'm not sure how to do that
(if feasible).
cheers


wx.FileDialog is only a wrapper for the api FileDialog (at least this
applies for windows) and therefore it is not possible to derive from it.

Really exclude, I think, is not possible.

You can put a mask
wx.FileDialog(...wildcard = "BMP files (*.bmp)|*.bmp|GIF files
(*.gif)|*.gif")

Otherwise you have to create your own FileDialog.
--
Franz Steinhaeusler
Jul 18 '05 #2

P: n/a
Hello Franz,

Franz Steinhaeusler <fr*****************@utanet.at> wrote in
news:q4********************************@4ax.com:
Is it possible to exclude certain files in a wx.FileDialog, so that the
user won't see them and can't select them with the mouse in de File open
window? I was thinking of somehow extending the class FileDialog(Dialog)
in the wx module _windows.py to a subclass, but I'm not sure how to do
that (if feasible).
wx.FileDialog is only a wrapper for the api FileDialog (at least this
applies for windows) and therefore it is not possible to derive from it. Really exclude, I think, is not possible. You can put a mask
wx.FileDialog(...wildcard = "BMP files (*.bmp)|*.bmp|GIF files
(*.gif)|*.gif")
In my experience this one shows only .bmp files, whereas
wildcard = "Image files | *.bmp;*.gif"
shows both extensions. Which i find strange, considering wxpython Help voor
wxFileDialog:

It must be noted that wildcard support in the native Motif file dialog is
quite limited: only one alternative is supported, and it is
displayed without the descriptive test; "BMP files (*.bmp)|*.bmp'' is
displayed as "*.bmp'', and both "BMP files (*.bmp)|*.bmp|GIF files
(*.gif)|*.gif'' and "Image files|*.bmp;*.gif'' are errors.

Unfortunately there is no expected extension for the input, most probably the
input files will have no extension at all, but it really is up to the user.

Otherwise you have to create your own FileDialog.

Yes, ehh, pff

Thanks for responding

cheers

Jul 18 '05 #3

P: n/a
On 19 Jan 2005 14:10:45 GMT, John Field <th**@is.invalid> wrote:

Hello John,
Unfortunately there is no expected extension for the input, most probably the
input files will have no extension at all, but it really is up to the user.

Otherwise you have to create your own FileDialog.

Yes, ehh, pff

Thanks for responding


you're welcome.
sorry, that i don't have any other infos for you anymore.

I would ask in the wxpython-user mailing list or
wxwidget Ng.

You can also take a look to DrPython;
There is a File drFileDialog, which is a
full FileDialog based on a wx.ListCtrl.

--
Franz Steinhaeusler
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.