开发者

Making a PythonCard File Dialog single select?

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 tha开发者_高级运维n 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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜