Platforms to show: All Mac Windows Linux Cross-Platform

Back to OpenDialogMBS class.

OpenDialogMBS.accessoryView as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 14.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Customizes the panel for the application by adding a custom view to the panel.

Only for Cocoa target. Must be a NSViewMBS or subclass.

The custom object that is added appears just above the OK and Cancel buttons at the bottom of the panel. The open panel automatically resizes itself to accommodate the view. You can invoke this method repeatedly to change the accessory view as needed. If view is nil, the panel removes the current accessory view.
(Read and Write property)

OpenDialogMBS.ActionButtonLabel as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The label of the action button.
Example
dim o as new OpenDialogMBS

o.ActionButtonLabel = "Hello"
o.ShowDialog

Used only on Mac OS.
For RB 4.5 and earlier you need to make sure the encoding is set correctly.
Can be set to "" to use the default value.
(Read and Write property)

Some examples using this property:

OpenDialogMBS.AllowFolderSelection as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 7.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
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=true
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)

Listbox1.AddRow f.NativePath
next
end if

Default is false.
Setting this to true on Windows or Linux has no effect there.
(Read and Write property)

OpenDialogMBS.CancelButtonLabel as String   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This item is deprecated and should no longer be used.
The text for the cancel button.
Example
dim o as new OpenDialogMBS

o.CancelButtonLabel = "Hello"
o.ShowDialog

Used only on Mac OS Carbon.
Can be set to "" to use the default value.

Deprecated as no longer needed for Windows, Linux or MacOS Cocoa.
(Read and Write property)

OpenDialogMBS.ClientName as String   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This item is deprecated and should no longer be used.
The name of the client.
Example
dim o as new OpenDialogMBS
o.ClientName = "Hello"
o.ShowDialog

Used only on Mac OS Carbon.
Can be set to "" to use the default value.

Deprecated as no longer needed for Windows, Linux or MacOS Cocoa.
(Read and Write property)

OpenDialogMBS.Creator as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The creator code of your application.

This property is only used Mac OS if you specify one or more file types.
(Read and Write property)

OpenDialogMBS.CustomPicture as Picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 11.0 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The custom picture content.

You need to call RefreshCustomImage to refresh the picture visible to the user.
(Read and Write property)

OpenDialogMBS.File as FolderItem

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop only
The first file selected.
Example
dim o as new OpenDialogMBS
o.MultipleSelection = true
o.ShowDialog

MsgBox o.File.displaypathmbs

file = files(0)
Just for the cases where you only need the first file.
(Read only property)

OpenDialogMBS.FileCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop only
The number of files selected.
Example
dim o as new OpenDialogMBS
o.MultipleSelection = true
o.ShowDialog

MsgBox str(o.FileCount)

(Read only property)

OpenDialogMBS.InitialDirectory as FolderItem

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ✅ Yes ❌ No ❌ No Desktop only
The initial directory.
Example
dim o as new OpenDialogMBS
o.InitialDirectory = SpecialFolder.Desktop
o.ShowDialog

Set to nil to get the last directory used.
(Read and Write property)

OpenDialogMBS.Lasterror as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop only
The last error code reported.

(Read and Write property)

OpenDialogMBS.Left as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The horizontal position of the dialog.

-1 is for the default position.
Used only on the Mac side.
(Read and Write property)

OpenDialogMBS.MultipleSelection as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop only
Whether you want to allow multiple file selection.
Example
dim o as new OpenDialogMBS
o.MultipleSelection = true
o.ShowDialog

(Read and Write property)

OpenDialogMBS.ParentWindow as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 6.3 ❌ No ✅ Yes ✅ Yes ❌ No Desktop only
The parent window of the dialog.
Example
dim o as new OpenDialogMBS
o.ParentWindow = window1
o.ShowDialog

Only implemented for Windows and Linux.
Can reference a Window or DesktopWindow object.
(Read and Write property)

OpenDialogMBS.PromptText as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The prompt text.
Example
dim o as new OpenDialogMBS

o.PromptText = "Hello"
o.ShowDialog

For RB 4.5 and earlier you need to make sure the encoding is set correctly.
Can be set to "" to use the default value.
(Read and Write property)

Some examples using this property:

OpenDialogMBS.ResolveAliases as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop only
Whether aliases should be resolved.
Example
dim o as new OpenDialogMBS
o.ResolveAliases = false
o.ShowDialog

This property is only used on Mac OS X.
Default is true.

Flag seems to be broken on Mac OS X 10.7.
(Read and Write property)

OpenDialogMBS.ShowHiddenFiles as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop only
Whether hidden files should be shown.
Example
dim o as new OpenDialogMBS
o.ShowHiddenFiles = true
o.ShowDialog

Default is false.
(Read and Write property)

Some examples using this property:

OpenDialogMBS.Top as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The vertical position of the dialog.

-1 is for the default position.
Used only on the Mac side.
(Read and Write property)

OpenDialogMBS.TreatFilePackagesAsDirectories as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 14.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the panel's behavior for displaying file packages (for example, MyApp.app) to the user.

If true, the panel will display file packages as directories; if false, it will not.
(Read and Write property)

OpenDialogMBS.UseCustomPicture as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 11.0 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Whether to add a custom picture control.

Specify the size of the area you want. As the size is relative to the font size of the system font on windows, the results can be interesting. For example a value of 50 gives here a 72 pixel height area. Value can be from 1 to 100. Or zero to disable.

This method was added for a client who needed to show a small preview of a project file in the open dialog on Windows.
For Mac OS X you can use the NSSavePanelMBS/NSOpenPanelMBS with an accessory view.
(Read and Write property)

OpenDialogMBS.WindowTitle as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Navigation MBS Util Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop only
The window title to use.
Example
dim o as new OpenDialogMBS

o.WindowTitle = "Hello World"
o.ShowDialog

Can be set to "" to use the default value.
Not shown on MacOS.
(Read and Write property)

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...