xtd 0.2.0
xtd::forms::open_file_box Class Referencefinal

Definition

Represents a common dialog box that displays a file selection dialog. This class cannot be inherited.

Header
#include <xtd/forms/open_file_box>
Namespace
xtd::forms
Library
xtd.forms
Appearance
Windows macOS Gnome
Light  
dialog_open_file_dialog_w.png
    html dialog_open_file_dialog_m.png    html dialog_open_file_dialog_g.png 
Dark  
dialog_open_file_dialog_wd.png
    html dialog_open_file_dialog_md.png    html dialog_open_file_dialog_gd.png 
Examples
The following code example demonstrates the use of xtd::forms::open_file_box dialog.
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include <xtd/forms/message_box>
#include <xtd/forms/open_file_box>
using namespace xtd;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Open file box example");
client_size({400, 200});
controls().push_back_range({button_open_single_file, button_open_multiple_files});
button_open_single_file.parent(*this)
.location({10, 10})
.size({150, 35})
.text("Select single file")
.click += [this] {
ustring file_name;
auto res = open_file_box::show(file_name, *this, "Please select a file...", ".", "Text Files (*.txt)|*.txt|All Files (*.*)|*.*");
if (res == dialog_result::ok)
message_box::show(ustring::format("Selected file is:\n{}", file_name));
};
button_open_multiple_files.parent(*this)
.location({10, 45})
.size({150, 35})
.text("Select multiple files")
.click += [] {
auto file_names = std::vector<ustring> {};
if (res == dialog_result::ok)
message_box::show(ustring::format("Selected files are:\n{}", ustring::join("\n", file_names)));
};
}
private:
button button_open_single_file;
button button_open_multiple_files;
};
auto main()->int {
application::run(form1 {});
}

Methods

static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::forms::iwin32_window &owner)
 Displays a select file dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::forms::iwin32_window &owner, const xtd::ustring &title)
 Displays a select file dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::forms::iwin32_window &owner, const xtd::ustring &title, const open_file_box_options options)
 Displays a select file dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::forms::iwin32_window &owner, const xtd::ustring &title, const xtd::ustring &initial_directory)
 Displays a select file dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::forms::iwin32_window &owner, const xtd::ustring &title, const xtd::ustring &initial_directory, const open_file_box_options options)
 Displays a select file dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::forms::iwin32_window &owner, const xtd::ustring &title, const xtd::ustring &initial_directory, const xtd::ustring &filter)
 Displays a select file dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::forms::iwin32_window &owner, const xtd::ustring &title, const xtd::ustring &initial_directory, const xtd::ustring &filter, const open_file_box_options options)
 Displays a select file dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name)
 Displays a select file dialog box. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::ustring &title)
 Displays a select file dialog box. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::ustring &title, const open_file_box_options options)
 Displays a select file dialog box. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::ustring &title, const xtd::ustring &initial_directory)
 Displays a select file dialog box. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::ustring &title, const xtd::ustring &initial_directory, const open_file_box_options options)
 Displays a select file dialog box. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::ustring &title, const xtd::ustring &initial_directory, const xtd::ustring &filter)
 Displays a select file dialog box. More...
 
static xtd::forms::dialog_result show (xtd::ustring &file_name, const xtd::ustring &title, const xtd::ustring &initial_directory, const xtd::ustring &filter, const open_file_box_options options)
 Displays a select file dialog box. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::forms::iwin32_window &owner, const xtd::ustring &title)
 Displays a multiple file select dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::forms::iwin32_window &owner, const xtd::ustring &title, const open_file_box_options options)
 Displays a multiple file select dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::forms::iwin32_window &owner, const xtd::ustring &title, const xtd::ustring &initial_directory)
 Displays a multiple file select dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::forms::iwin32_window &owner, const xtd::ustring &title, const xtd::ustring &initial_directory, const open_file_box_options options)
 Displays a multiple file select dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::forms::iwin32_window &owner, const xtd::ustring &title, const xtd::ustring &initial_directory, const xtd::ustring &filter)
 Displays a multiple file select dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::forms::iwin32_window &owner, const xtd::ustring &title, const xtd::ustring &initial_directory, const xtd::ustring &filter, const open_file_box_options options)
 Displays a multiple file select dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::ustring &title)
 Displays a multiple file select dialog box. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::ustring &title, const open_file_box_options options)
 Displays a multiple file select dialog box. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::ustring &title, const xtd::ustring &initial_directory)
 Displays a multiple file select dialog box. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::ustring &title, const xtd::ustring &initial_directory, const open_file_box_options options)
 Displays a multiple file select dialog box. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::ustring &title, const xtd::ustring &initial_directory, const xtd::ustring &filter)
 Displays a multiple file select dialog box. More...
 
static xtd::forms::dialog_result show (std::vector< xtd::ustring > &file_names, const xtd::ustring &title, const xtd::ustring &initial_directory, const xtd::ustring &filter, const open_file_box_options options)
 Displays a multiple file select dialog box. More...
 

Member Function Documentation

◆ show() [1/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::forms::iwin32_window owner 
)
static

Displays a select file dialog box in front of a specified window.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.
Examples:
open_file_box.cpp.

◆ show() [2/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::forms::iwin32_window owner,
const xtd::ustring title 
)
static

Displays a select file dialog box in front of a specified window.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [3/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::forms::iwin32_window owner,
const xtd::ustring title,
const open_file_box_options  options 
)
static

Displays a select file dialog box in front of a specified window.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [4/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::forms::iwin32_window owner,
const xtd::ustring title,
const xtd::ustring initial_directory 
)
static

Displays a select file dialog box in front of a specified window.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [5/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::forms::iwin32_window owner,
const xtd::ustring title,
const xtd::ustring initial_directory,
const open_file_box_options  options 
)
static

Displays a select file dialog box in front of a specified window.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [6/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::forms::iwin32_window owner,
const xtd::ustring title,
const xtd::ustring initial_directory,
const xtd::ustring filter 
)
static

Displays a select file dialog box in front of a specified window.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
filterAn xtd::ustring that specifies the file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box, separated by vertical bar | for example:
(*.txt)|*.txt|All files (*.*)|*.* 
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [7/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::forms::iwin32_window owner,
const xtd::ustring title,
const xtd::ustring initial_directory,
const xtd::ustring filter,
const open_file_box_options  options 
)
static

Displays a select file dialog box in front of a specified window.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
filterAn xtd::ustring that specifies the file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box, separated by vertical bar | for example:
(*.txt)|*.txt|All files (*.*)|*.* 
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [8/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name)
static

Displays a select file dialog box.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [9/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::ustring title 
)
static

Displays a select file dialog box.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [10/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::ustring title,
const open_file_box_options  options 
)
static

Displays a select file dialog box.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [11/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::ustring title,
const xtd::ustring initial_directory 
)
static

Displays a select file dialog box.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [12/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::ustring title,
const xtd::ustring initial_directory,
const open_file_box_options  options 
)
static

Displays a select file dialog box.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [13/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::ustring title,
const xtd::ustring initial_directory,
const xtd::ustring filter 
)
static

Displays a select file dialog box.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
filterAn xtd::ustring that specifies the file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box, separated by vertical bar | for example:
(*.txt)|*.txt|All files (*.*)|*.* 
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [14/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( xtd::ustring file_name,
const xtd::ustring title,
const xtd::ustring initial_directory,
const xtd::ustring filter,
const open_file_box_options  options 
)
static

Displays a select file dialog box.

Parameters
file_nameAn output xtd::ustring that will store the selected file name.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
filterAn xtd::ustring that specifies the file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box, separated by vertical bar | for example:
(*.txt)|*.txt|All files (*.*)|*.* 
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_name parameter will contain the selected file path, otherwise it will be ignored.

◆ show() [15/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::forms::iwin32_window owner,
const xtd::ustring title 
)
static

Displays a multiple file select dialog box in front of a specified window.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

◆ show() [16/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::forms::iwin32_window owner,
const xtd::ustring title,
const open_file_box_options  options 
)
static

Displays a multiple file select dialog box in front of a specified window.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

◆ show() [17/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::forms::iwin32_window owner,
const xtd::ustring title,
const xtd::ustring initial_directory 
)
static

Displays a multiple file select dialog box in front of a specified window.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

◆ show() [18/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::forms::iwin32_window owner,
const xtd::ustring title,
const xtd::ustring initial_directory,
const open_file_box_options  options 
)
static

Displays a multiple file select dialog box in front of a specified window.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

◆ show() [19/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::forms::iwin32_window owner,
const xtd::ustring title,
const xtd::ustring initial_directory,
const xtd::ustring filter 
)
static

Displays a multiple file select dialog box in front of a specified window.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
filterAn xtd::ustring that specifies the file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box, separated by vertical bar | for example:
(*.txt)|*.txt|All files (*.*)|*.* 
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

◆ show() [20/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::forms::iwin32_window owner,
const xtd::ustring title,
const xtd::ustring initial_directory,
const xtd::ustring filter,
const open_file_box_options  options 
)
static

Displays a multiple file select dialog box in front of a specified window.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
filterAn xtd::ustring that specifies the file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box, separated by vertical bar | for example:
(*.txt)|*.txt|All files (*.*)|*.* 
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

◆ show() [21/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::ustring title 
)
static

Displays a multiple file select dialog box.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

◆ show() [22/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::ustring title,
const open_file_box_options  options 
)
static

Displays a multiple file select dialog box.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

◆ show() [23/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::ustring title,
const xtd::ustring initial_directory 
)
static

Displays a multiple file select dialog box.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

◆ show() [24/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::ustring title,
const xtd::ustring initial_directory,
const open_file_box_options  options 
)
static

Displays a multiple file select dialog box.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

◆ show() [25/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::ustring title,
const xtd::ustring initial_directory,
const xtd::ustring filter 
)
static

Displays a multiple file select dialog box.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
filterAn xtd::ustring that specifies the file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box, separated by vertical bar | for example:
(*.txt)|*.txt|All files (*.*)|*.* 
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

◆ show() [26/26]

static xtd::forms::dialog_result xtd::forms::open_file_box::show ( std::vector< xtd::ustring > &  file_names,
const xtd::ustring title,
const xtd::ustring initial_directory,
const xtd::ustring filter,
const open_file_box_options  options 
)
static

Displays a multiple file select dialog box.

Parameters
file_namesAn output std::vector <xtd::ustring> that will store the selected file names.
titleAn xtd::ustring that specifies the caption title of the file dialog box.
initial_directoryAn xtd::ustring that specifies the initial directory displayed by the file dialog box
filterAn xtd::ustring that specifies the file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box, separated by vertical bar | for example:
(*.txt)|*.txt|All files (*.*)|*.* 
optionsA bitwise combination of enum xtd::forms::open_file_box_options to specify additional options to the file dialog box
Returns
xtd::forms::dialog_result::ok if the user clicks OK in the dialog box; otherwise, xtd::forms::dialog_result::cancel.
Remarks
If xtd::forms::dialog_result is xtd::forms::dialog_result::ok, the output file_names parameter will contain the selected file paths, otherwise it will be ignored.

The documentation for this class was generated from the following file: