Use GetPaths() instead of GetPath(). Then you get a list of zero or more
paths that you can iterate through.
···
-----Original Message-----
From: Martijn Ras [mailto:ras@holmes.nl]
Sent: Monday, December 01, 2003 4:05 AM
To: wxpython-dev@lists.wxwindows.org
Subject: [wxPython-dev] FileBrowseButton wxMULTIPLE support
Heya Folks,
The FileBrowseButton appears to ignore all but the last file selected
when you set the fileMode to wxMULTIPLE.
Did i miss something, or is my observation correct?
For now, I've hacked the OnBrowse () method as follows to get all files
into the textControl.
if dlg.ShowModal() == wxID_OK:
- self.SetValue(dlg.GetPath())
+ if self.fileMode == wxMULTIPLE:
+ path = ""
+ paths = dlg.GetPaths()
+ for curpath in paths:
+ if path != "":
+ path = path + "," + curpath
+ else:
+ path = curpath
+ self.SetValue(path)
+ else:
+ self.SetValue(dlg.GetPath())
dlg.Destroy()
Mazzel,
Martijn.
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-dev-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-dev-help@lists.wxwindows.org