Multiple file types in wx.FileDialog

The call is sensitive to spacing - even a single extra space will ruin things. I learned that the hard way when creating the equivalent open file call in Dabo. You might want to take a look at Dabo, as it wraps wxPython and simplifies a lot of the unpleasant code that you have to create in raw wxPython. In Dabo, your call would look like:

  f = dabo.ui.getFile("png", "bmp", "jpg", "pcx", "tif")

  You just pass as many extensions as you like, and the appropriate dialog will be created. If the user selects a file, it is returned; if they cancel, None is returned. You don't have to worry about creating the dialog, reading its return value, destroying it when it's done.

      ___/
     /
    __/
   /
  ____/
  Ed Leafe
  http://leafe.com/
  http://dabodev.com/

···

On Apr 15, 2005, at 9:52 PM, Ray Pasco wrote:

I can't seem to get multiple file types to work in wx.FileDialog (XP, 2.5.5.0pre.20050326).
Numerous examples indicate this should work. Only file types of the first kind in the list
appear in the dialog. Has anyone seen this problem ?

Adi Jörg Sieker wrote:

Adi Jörg Sieker wrote:

Ray Pasco wrote:
[snip]

Has anyone else had trouble displaying multiple file types in wx.FileDialog ?

Nope, works fine here using this wildcard string:
wildcard = "SAPScript RDI (*.rdi;*.dat;*.prt)|*.rdi;*.dat;*.prt|" \
           "All files (*.*)|*.*"

I'm using Python 2.4 with wxPython 2.5.3.1 unicode on WindowsXP SP2

Adi

Thanks ! This syntax is not in any other example I've located.

Ray