You can use
您可以使用
SelectFolder() to get a folder
SelectFolder()获取文件夹
or
GetOpenFolderitem(filter as string) to get files
GetOpenFolderitem(过滤为字符串)来获取文件
but can you select either a folder or file? ( or for that matter selecting multiple files )
但你可以选择文件夹或文件吗? (或者选择多个文件)
4 个解决方案
#1
5
The MonkeyBread plugin allows this in the OpenDialogMBS class.
MonkeyBread插件允许在OpenDialogMBS类中使用它。
http://www.monkeybreadsoftware.net/pluginhelp/navigation-opendialogmbs.shtml
OpenDialogMBS.AllowFolderSelection as Boolean
property, Navigation, MBS Util Plugin (OpenDialog), class OpenDialogMBS, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether folders can be selected.
Example:
dim o as OpenDialogMBS
dim i,c as integer
dim f as FolderItem
o=new OpenDialogMBS
o.ShowHiddenFiles=true
o.PromptText="Select one or more files/folders:"
o.MultipleSelection=false
o.ActionButtonLabel="Open files/folders"
o.CancelButtonLabel="no, thanks."
o.WindowTitle="This is a window title."
o.ClientName="Client Name?"
o.AllowFolderSelection=true
o.ShowDialog
c=o.FileCount
if c>0 then
for i=0 to c-1
f=o.Files(i)
FileList.List.AddRow f.AbsolutePath
next
end if
Notes:
Default is false.
Setting this to true on Windows or Linux has no effect there.
(Read and Write property)
#2
0
It's not possible via any of the built-in APIs. There might be a plugin to do it, but I don't think there's OS support for it.
通过任何内置API都无法实现。可能有一个插件可以做到,但我不认为有操作系统支持它。
#3
0
A bit late, but it's been included in recent versions. I'll put it here in case someone stumbles like me in this question:
有点晚了,但它已被包含在最近的版本中。我会把它放在这里以防万一在这个问题上有人像我一样绊倒:
RealBasic Multiple Selection: OpenDialog.MultiSelect
RealBasic Multiple Selection:OpenDialog.MultiSelect
#4
-3
Assuming you're using .Net I think you'll need to create your own control (or buy one).
假设您正在使用.Net,我认为您需要创建自己的控件(或购买一个)。
#1
5
The MonkeyBread plugin allows this in the OpenDialogMBS class.
MonkeyBread插件允许在OpenDialogMBS类中使用它。
http://www.monkeybreadsoftware.net/pluginhelp/navigation-opendialogmbs.shtml
OpenDialogMBS.AllowFolderSelection as Boolean
property, Navigation, MBS Util Plugin (OpenDialog), class OpenDialogMBS, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether folders can be selected.
Example:
dim o as OpenDialogMBS
dim i,c as integer
dim f as FolderItem
o=new OpenDialogMBS
o.ShowHiddenFiles=true
o.PromptText="Select one or more files/folders:"
o.MultipleSelection=false
o.ActionButtonLabel="Open files/folders"
o.CancelButtonLabel="no, thanks."
o.WindowTitle="This is a window title."
o.ClientName="Client Name?"
o.AllowFolderSelection=true
o.ShowDialog
c=o.FileCount
if c>0 then
for i=0 to c-1
f=o.Files(i)
FileList.List.AddRow f.AbsolutePath
next
end if
Notes:
Default is false.
Setting this to true on Windows or Linux has no effect there.
(Read and Write property)
#2
0
It's not possible via any of the built-in APIs. There might be a plugin to do it, but I don't think there's OS support for it.
通过任何内置API都无法实现。可能有一个插件可以做到,但我不认为有操作系统支持它。
#3
0
A bit late, but it's been included in recent versions. I'll put it here in case someone stumbles like me in this question:
有点晚了,但它已被包含在最近的版本中。我会把它放在这里以防万一在这个问题上有人像我一样绊倒:
RealBasic Multiple Selection: OpenDialog.MultiSelect
RealBasic Multiple Selection:OpenDialog.MultiSelect
#4
-3
Assuming you're using .Net I think you'll need to create your own control (or buy one).
假设您正在使用.Net,我认为您需要创建自己的控件(或购买一个)。