[wxpython] exclude files in a wx.FileDialog?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Field

    #1

    [wxpython] exclude files in a wx.FileDialog?

    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(Dial og)
    in the wx module _windows.py to a subclass, but I'm not sure how to do that
    (if feasible).


    cheers
  • Franz Steinhaeusler

    #2
    Re: [wxpython] exclude files in a wx.FileDialog?

    On 18 Jan 2005 13:23:24 GMT, John Field <this@is.invali d> wrote:
    [color=blue]
    >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(Dial og)
    >in the wx module _windows.py to a subclass, but I'm not sure how to do that
    >(if feasible).
    >
    >
    >cheers[/color]

    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|G IF files
    (*.gif)|*.gif")

    Otherwise you have to create your own FileDialog.
    --
    Franz Steinhaeusler

    Comment

    • John Field

      #3
      Re: [wxpython] exclude files in a wx.FileDialog?

      Hello Franz,

      Franz Steinhaeusler <franz.steinhae usler@utanet.at > wrote in
      news:q44qu058m4 1vu3609vbr2ejpo evt5h02f5@4ax.c om:
      [color=blue][color=green]
      >>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?[/color][/color]
      [color=blue][color=green]
      >>I was thinking of somehow extending the class FileDialog(Dial og)
      >>in the wx module _windows.py to a subclass, but I'm not sure how to do
      >>that (if feasible).[/color][/color]
      [color=blue]
      > 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.[/color]
      [color=blue]
      > Really exclude, I think, is not possible.[/color]
      [color=blue]
      > You can put a mask
      > wx.FileDialog(. ..wildcard = "BMP files (*.bmp)|*.bmp|G IF files
      > (*.gif)|*.gif")[/color]

      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|G IF files
      (*.gif)|*.gif'' and "Image files|*.bmp;*.g if'' 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.

      [color=blue]
      > Otherwise you have to create your own FileDialog.[/color]
      Yes, ehh, pff

      Thanks for responding

      cheers

      Comment

      • Franz Steinhaeusler

        #4
        Re: [wxpython] exclude files in a wx.FileDialog?

        On 19 Jan 2005 14:10:45 GMT, John Field <this@is.invali d> wrote:

        Hello John,
        [color=blue]
        >Unfortunatel y 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.
        >
        >[color=green]
        >> Otherwise you have to create your own FileDialog.[/color]
        >Yes, ehh, pff
        >
        >Thanks for responding[/color]

        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

        Comment

        Working...