xtd 1.0.0
Loading...
Searching...
No Matches
xtd::forms::open_file_box Class Referencefinal
Inheritance diagram for xtd::forms::open_file_box:
xtd::static_object

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
Dark
Examples
The following code example demonstrates the use of xtd::forms::open_file_box dialog.
#include <xtd/xtd>
class form1 : public form {
public:
form1() {
text("Open file box example");
client_size({400, 200});
controls().add_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 += delegate_ {
string 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(string::format("Selected file is:\n{}", file_name));
};
button_open_multiple_files.parent(*this)
.location({10, 45})
.size({150, 35})
.text("Select multiple files")
.click += delegate_ {
auto file_names = array<string> {};
auto res = open_file_box::show(file_names, "Please select multiple files...", open_file_box_options::check_file_exists | open_file_box_options::show_hidden_files);
if (res == dialog_result::ok)
message_box::show(string::format("Selected files are:\n{}", string::join("\n", file_names)));
};
}
private:
button button_open_single_file;
button button_open_multiple_files;
};
auto main() -> int {
application::run(form1 {});
}
virtual auto size() const noexcept -> xtd::drawing::size
Gets the height and width of the control.
virtual auto text() const noexcept -> const xtd::string &
Gets the text associated with this control.
virtual auto client_size() const noexcept -> const xtd::drawing::size &
Gets the height and width of the client area of the control.
virtual auto controls() noexcept -> control_collection &
Gets the collection of controls contained within the control.
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
static auto show() -> xtd::forms::dialog_result
Displays a message box.
static auto show(xtd::string &file_name, const xtd::forms::iwin32_window &owner) -> xtd::forms::dialog_result
Displays a select file dialog box in front of a specified window.
#define delegate_
The declaration of a delegate type is similar to a method signature. It has a return value and any nu...
Definition delegate.hpp:1018
xtd::forms::style_sheets::control button
The buttton data allows you to specify the box of a button control.
Definition button.hpp:25

Public Static Methods

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

Member Function Documentation

◆ show() [1/26]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::forms::iwin32_window & owner ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_nameAn output xtd::string 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.

◆ show() [2/26]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::forms::iwin32_window & owner,
const xtd::string & title ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_nameAn output xtd::string that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::forms::iwin32_window & owner,
const xtd::string & title,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_nameAn output xtd::string that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::forms::iwin32_window & owner,
const xtd::string & title,
const xtd::string & initial_directory ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_nameAn output xtd::string that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::forms::iwin32_window & owner,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_nameAn output xtd::string that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::forms::iwin32_window & owner,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::string & filter ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_nameAn output xtd::string that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string that specifies the initial directory displayed by the file dialog box
filterAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::forms::iwin32_window & owner,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::string & filter,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_nameAn output xtd::string that will store the selected file name.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string that specifies the initial directory displayed by the file dialog box
filterAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name) -> xtd::forms::dialog_result
staticnodiscard

Displays a select file dialog box.

Parameters
file_nameAn output xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::string & title ) -> xtd::forms::dialog_result
staticnodiscard

Displays a select file dialog box.

Parameters
file_nameAn output xtd::string that will store the selected file name.
titleAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::string & title,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

Displays a select file dialog box.

Parameters
file_nameAn output xtd::string that will store the selected file name.
titleAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::string & title,
const xtd::string & initial_directory ) -> xtd::forms::dialog_result
staticnodiscard

Displays a select file dialog box.

Parameters
file_nameAn output xtd::string that will store the selected file name.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

Displays a select file dialog box.

Parameters
file_nameAn output xtd::string that will store the selected file name.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::string & filter ) -> xtd::forms::dialog_result
staticnodiscard

Displays a select file dialog box.

Parameters
file_nameAn output xtd::string that will store the selected file name.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string that specifies the initial directory displayed by the file dialog box
filterAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::string & file_name,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::string & filter,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

Displays a select file dialog box.

Parameters
file_nameAn output xtd::string that will store the selected file name.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string that specifies the initial directory displayed by the file dialog box
filterAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::forms::iwin32_window & owner,
const xtd::string & title ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_namesAn output xtd::array <xtd::string> 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::forms::iwin32_window & owner,
const xtd::string & title,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_namesAn output xtd::array <xtd::string> that will store the selected file names.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::forms::iwin32_window & owner,
const xtd::string & title,
const xtd::string & initial_directory ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_namesAn output xtd::array <xtd::string> that will store the selected file names.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::forms::iwin32_window & owner,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_namesAn output xtd::array <xtd::string> that will store the selected file names.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::forms::iwin32_window & owner,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::string & filter ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_namesAn output xtd::array <xtd::string> that will store the selected file names.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string that specifies the initial directory displayed by the file dialog box
filterAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::forms::iwin32_window & owner,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::string & filter,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

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

Parameters
file_namesAn output xtd::array <xtd::string> that will store the selected file names.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string that specifies the initial directory displayed by the file dialog box
filterAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::string & title ) -> xtd::forms::dialog_result
staticnodiscard

Displays a multiple file select dialog box.

Parameters
file_namesAn output xtd::array <xtd::string> that will store the selected file names.
titleAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::string & title,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

Displays a multiple file select dialog box.

Parameters
file_namesAn output xtd::array <xtd::string> that will store the selected file names.
titleAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::string & title,
const xtd::string & initial_directory ) -> xtd::forms::dialog_result
staticnodiscard

Displays a multiple file select dialog box.

Parameters
file_namesAn output xtd::array <xtd::string> that will store the selected file names.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

Displays a multiple file select dialog box.

Parameters
file_namesAn output xtd::array <xtd::string> that will store the selected file names.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::string & filter ) -> xtd::forms::dialog_result
staticnodiscard

Displays a multiple file select dialog box.

Parameters
file_namesAn output xtd::array <xtd::string> that will store the selected file names.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string that specifies the initial directory displayed by the file dialog box
filterAn xtd::string 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]

auto xtd::forms::open_file_box::show ( xtd::array< xtd::string > & file_names,
const xtd::string & title,
const xtd::string & initial_directory,
const xtd::string & filter,
const xtd::forms::open_file_box_options options ) -> xtd::forms::dialog_result
staticnodiscard

Displays a multiple file select dialog box.

Parameters
file_namesAn output xtd::array <xtd::string> that will store the selected file names.
titleAn xtd::string that specifies the caption title of the file dialog box.
initial_directoryAn xtd::string that specifies the initial directory displayed by the file dialog box
filterAn xtd::string 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: