xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::folder_browser_box Class Referencefinal
Inheritance diagram for xtd::forms::folder_browser_box:
xtd::static_object

Definition

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

Header
#include <xtd/forms/folder_browser_box>
Namespace
xtd::forms
Library
xtd.forms
Appearance
Windows macOS Gnome
Light  
 
 
 
 
 
Dark  
 
 
 
 
 
Examples
The following code example demonstrates the use of xtd::forms::folder_browser_box dialog.
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/folder_browser_box>
#include <xtd/forms/form>
#include <xtd/forms/label>
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, 50});
}
private:
label label1;
ustring selected_path;
};
auto main()->int {
application::run(form1 {});
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
Represents a Windows button control.
Definition button.h:47
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:52
Represents a standard Windows label.
Definition label.h:36
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
@ button1
The first button on the message box is the default button.
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10

Public Static 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.
 
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.
 
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.
 
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.
 
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.
 
static xtd::forms::dialog_result show (xtd::ustring &selected_path)
 Displays a folder browser dialog box.
 
static xtd::forms::dialog_result show (xtd::ustring &selected_path, const xtd::ustring &description)
 Displays a folder browser dialog box.
 
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.
 
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.
 
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.
 

Member Function Documentation

◆ show() [1/10]

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

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() [2/10]

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

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 
)
static

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() [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 
)
static

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() [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 
)
static

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() [6/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 
)
static

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() [7/10]

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

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 
)
static

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 
)
static

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 
)
static

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: