views:

53

answers:

2

I'm working on a python application and have chosen to build the gui with PythonCard. I have need to have the user select a file to open, and in the context, selecting more than 1 file doesn't make sense. I can successfully create a file dioalog with

dialog.fileDialog(self, 'Open Input File', '', '')

And I would imagine I need to use the optional style parameter in order to get a sinlge select dialog, but I can't find an example or documentation of what I need to pass to the fifth param in order to get a single select file dialog.

+1  A: 

Try setting the last line to wx.OPEN - that should be it. It seems that PythonCard specifies a dialog's main style as wx.OPEN | wx.MULTIPLE, so overriding it to just open should do the trick.

Steven Sproat
this wordked. its also worth noting that the style parameter is the 6th param, not the 5th.
shsteimer
A: 

Here's a reference for PythonCard dialogs: pythoncard.sourceforge.net/dialogs

It provides an explanation of the arguments for each dialog type along with examples.

justus87