[wxpython] exclude files in a wx.FileDialog?

Discussion in 'Python' started by John Field, Jan 18, 2005.

  1. John Field

    John Field Guest

    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
    John Field, Jan 18, 2005
    #1
    1. Advertising

  2. On 18 Jan 2005 13:23:24 GMT, John Field <> 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
    Franz Steinhaeusler, Jan 18, 2005
    #2
    1. Advertising

  3. John Field

    John Field Guest

    Hello Franz,

    Franz Steinhaeusler <> wrote in
    news::

    >>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
    John Field, Jan 19, 2005
    #3
  4. On 19 Jan 2005 14:10:45 GMT, John Field <> 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
    Franz Steinhaeusler, Jan 19, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ike
    Replies:
    2
    Views:
    524
  2. Anand Pillai

    wxPython Filedialog question

    Anand Pillai, Jun 27, 2003, in forum: Python
    Replies:
    0
    Views:
    1,048
    Anand Pillai
    Jun 27, 2003
  3. tom

    Can Epydoc exclude wxPython?

    tom, Mar 5, 2007, in forum: Python
    Replies:
    0
    Views:
    455
  4. OhKyu Yoon
    Replies:
    1
    Views:
    346
  5. SMALLp
    Replies:
    5
    Views:
    8,300
    Tim Roberts
    Dec 23, 2007
Loading...

Share This Page