xtd - Reference Guide 0.2.0
xtd::forms::folder_browser_box Class Referencefinal

#include <folder_browser_box.h>

Definition

Represents a common dialog box that displays a folder browser dialog. This class cannot be inherited.

Namespace
xtd::forms
Library
xtd.forms
Examples
The following code example demonstrates the use of xtd::forms::folder_browser_box dialog.
#include <xtd/xtd>
using namespace std;
using namespace xtd;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Folder browser box example");
controls().push_back(button1);
button1.location({10, 10});
button1.text("Folder...");
button1.click += [&] {
if (folder_browser_box::show(selected_path, *this) == forms::dialog_result::ok)
label1.text(ustring::format("Path = {}", selected_path));
};
label1.parent(*this);
label1.text("Path = ");
label1.auto_size(true);
label1.location({10, 40});
}
private:
label label1;
ustring selected_path;
};
int main() {
application::run(form1 {});
}

Methods

static xtd::forms::dialog_result show (xtd::ustring &selected_path, const xtd::forms::iwin32_window &owner)
 Displays a folder browser dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &selected_path, const xtd::forms::iwin32_window &owner, const xtd::ustring &description)
 Displays a folder browser dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &selected_path, const xtd::forms::iwin32_window &owner, const xtd::ustring &description, xtd::environment::special_folder root_folder)
 Displays a folder browser dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &selected_path, const xtd::forms::iwin32_window &owner, const xtd::ustring &description, xtd::environment::special_folder root_folder, bool show_new_folder_button)
 Displays a folder browser dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &selected_path, const xtd::forms::iwin32_window &owner, const xtd::ustring &description, xtd::environment::special_folder root_folder, bool show_new_folder_button, bool auto_upgrade_enable)
 Displays a folder browser dialog box in front of a specified window. More...
 
static xtd::forms::dialog_result show (xtd::ustring &selected_path)
 Displays a folder browser dialog box. More...
 
static xtd::forms::dialog_result show (xtd::ustring &selected_path, const xtd::ustring &description)
 Displays a folder browser dialog box. More...
 
static xtd::forms::dialog_result show (xtd::ustring &selected_path, const xtd::ustring &description, xtd::environment::special_folder root_folder)
 Displays a folder browser dialog box. More...
 
static xtd::forms::dialog_result show (xtd::ustring &selected_path, const xtd::ustring &description, xtd::environment::special_folder root_folder, bool show_new_folder_button)
 Displays a folder browser dialog box. More...
 
static xtd::forms::dialog_result show (xtd::ustring &selected_path, const xtd::ustring &description, xtd::environment::special_folder root_folder, bool show_new_folder_button, bool auto_upgrade_enable)
 Displays a folder browser dialog box. More...
 

Member Function Documentation

◆ show() [1/10]

static xtd::forms::dialog_result xtd::forms::folder_browser_box::show ( xtd::ustring selected_path,
const xtd::forms::iwin32_window owner 
)
inlinestatic

Displays a folder browser dialog box in front of a specified window.

Parameters
selected_pathA xtd::ustring that represents the path selected by the user.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
descriptionAn xtd::ustring that specifies the descriptive text displayed above the tree view control in the 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 selected_path parameter will contain the selected path, otherwise it will be ignored.

◆ show() [2/10]

static xtd::forms::dialog_result xtd::forms::folder_browser_box::show ( xtd::ustring selected_path,
const xtd::forms::iwin32_window owner,
const xtd::ustring description 
)
inlinestatic

Displays a folder browser dialog box in front of a specified window.

Parameters
selected_pathA xtd::ustring that represents the path selected by the user.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
descriptionAn xtd::ustring that specifies the descriptive text displayed above the tree view control in the 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 selected_path parameter will contain the selected path, otherwise it will be ignored.

◆ show() [3/10]

static xtd::forms::dialog_result xtd::forms::folder_browser_box::show ( xtd::ustring selected_path,
const xtd::forms::iwin32_window owner,
const xtd::ustring description,
xtd::environment::special_folder  root_folder 
)
inlinestatic

Displays a folder browser dialog box in front of a specified window.

Parameters
selected_pathA xtd::ustring that represents the path selected by the user.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
descriptionAn xtd::ustring that specifies the descriptive text displayed above the tree view control in the dialog box.
root_folderOne of xtd::environment::special_folder values that specifies the root folder where the browsing starts from.
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 selected_path parameter will contain the selected path, otherwise it will be ignored.

◆ show() [4/10]

static xtd::forms::dialog_result xtd::forms::folder_browser_box::show ( xtd::ustring selected_path,
const xtd::forms::iwin32_window owner,
const xtd::ustring description,
xtd::environment::special_folder  root_folder,
bool  show_new_folder_button 
)
inlinestatic

Displays a folder browser dialog box in front of a specified window.

Parameters
selected_pathA xtd::ustring that represents the path selected by the user.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
descriptionAn xtd::ustring that specifies the descriptive text displayed above the tree view control in the dialog box.
root_folderOne of xtd::environment::special_folder values that specifies the root folder where the browsing starts from.
show_new_folder_buttonA value indicating whether the New Folder button appears in the folder browser 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 selected_path parameter will contain the selected path, otherwise it will be ignored.

◆ show() [5/10]

static xtd::forms::dialog_result xtd::forms::folder_browser_box::show ( xtd::ustring selected_path,
const xtd::forms::iwin32_window owner,
const xtd::ustring description,
xtd::environment::special_folder  root_folder,
bool  show_new_folder_button,
bool  auto_upgrade_enable 
)
inlinestatic

Displays a folder browser dialog box in front of a specified window.

Parameters
selected_pathA xtd::ustring that represents the path selected by the user.
ownerAn xtd::forms::iwin32_window that represents the owner window of the file dialog box.
descriptionAn xtd::ustring that specifies the descriptive text displayed above the tree view control in the dialog box.
root_folderOne of xtd::environment::special_folder values that specifies the root folder where the browsing starts from.
show_new_folder_buttonA value indicating whether the New Folder button appears in the folder browser dialog box.
auto_upgrade_enableA value that indicates whether the dialog will be automatically upgraded to enable new features.
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 selected_path parameter will contain the selected path, otherwise it will be ignored.

◆ show() [6/10]

static xtd::forms::dialog_result xtd::forms::folder_browser_box::show ( xtd::ustring selected_path)
inlinestatic

Displays a folder browser dialog box.

Parameters
selected_pathA xtd::ustring that represents the path selected by the user.
descriptionAn xtd::ustring that specifies the descriptive text displayed above the tree view control in the 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 selected_path parameter will contain the selected path, otherwise it will be ignored.

◆ show() [7/10]

static xtd::forms::dialog_result xtd::forms::folder_browser_box::show ( xtd::ustring selected_path,
const xtd::ustring description 
)
inlinestatic

Displays a folder browser dialog box.

Parameters
selected_pathA xtd::ustring that represents the path selected by the user.
descriptionAn xtd::ustring that specifies the descriptive text displayed above the tree view control in the 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 selected_path parameter will contain the selected path, otherwise it will be ignored.

◆ show() [8/10]

static xtd::forms::dialog_result xtd::forms::folder_browser_box::show ( xtd::ustring selected_path,
const xtd::ustring description,
xtd::environment::special_folder  root_folder 
)
inlinestatic

Displays a folder browser dialog box.

Parameters
selected_pathA xtd::ustring that represents the path selected by the user.
descriptionAn xtd::ustring that specifies the descriptive text displayed above the tree view control in the dialog box.
root_folderOne of xtd::environment::special_folder values that specifies the root folder where the browsing starts from.
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 selected_path parameter will contain the selected path, otherwise it will be ignored.

◆ show() [9/10]

static xtd::forms::dialog_result xtd::forms::folder_browser_box::show ( xtd::ustring selected_path,
const xtd::ustring description,
xtd::environment::special_folder  root_folder,
bool  show_new_folder_button 
)
inlinestatic

Displays a folder browser dialog box.

Parameters
selected_pathA xtd::ustring that represents the path selected by the user.
descriptionAn xtd::ustring that specifies the descriptive text displayed above the tree view control in the dialog box.
root_folderOne of xtd::environment::special_folder values that specifies the root folder where the browsing starts from.
show_new_folder_buttonA value indicating whether the New Folder button appears in the folder browser 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 selected_path parameter will contain the selected path, otherwise it will be ignored.

◆ show() [10/10]

static xtd::forms::dialog_result xtd::forms::folder_browser_box::show ( xtd::ustring selected_path,
const xtd::ustring description,
xtd::environment::special_folder  root_folder,
bool  show_new_folder_button,
bool  auto_upgrade_enable 
)
inlinestatic

Displays a folder browser dialog box.

Parameters
selected_pathA xtd::ustring that represents the path selected by the user.
descriptionAn xtd::ustring that specifies the descriptive text displayed above the tree view control in the dialog box.
root_folderOne of xtd::environment::special_folder values that specifies the root folder where the browsing starts from.
show_new_folder_buttonA value indicating whether the New Folder button appears in the folder browser dialog box.
auto_upgrade_enableA value that indicates whether the dialog will be automatically upgraded to enable new features.
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 selected_path parameter will contain the selected path, otherwise it will be ignored.

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