Prompts the user to select a folder. This class cannot be inherited.
Windows | macOS | Gnome | |
---|---|---|---|
Light | ![]() | ![]() | ![]() |
Dark | ![]() | ![]() | ![]() |
Public Constructors | |
folder_browser_dialog () | |
Initializes a new instance of the folder_browser_dialog class. | |
Public Properties | |
bool | auto_upgrade_enable () const noexcept |
Gets a value that indicates whether the dialog will be automatically upgraded to enable new features. | |
folder_browser_dialog & | auto_upgrade_enable (bool value) |
Sets a value that indicates whether the dialog will be automatically upgraded to enable new features. | |
const xtd::string & | description () const noexcept |
Gets the descriptive text displayed above the tree view control in the dialog box. | |
folder_browser_dialog & | description (const xtd::string &value) |
Sets the descriptive text displayed above the tree view control in the dialog box. | |
environment::special_folder | root_folder () const noexcept |
Gets the root folder where the browsing starts from. | |
folder_browser_dialog & | root_folder (environment::special_folder value) |
Sets the root folder where the browsing starts from. | |
const xtd::string & | selected_path () const noexcept |
Gets the path selected by the user. | |
folder_browser_dialog & | selected_path (const xtd::string &value) |
Sets the path selected by the user. | |
bool | show_new_folder_button () const noexcept |
Gets a value indicating whether the New Folder button appears in the folder browser dialog box. | |
folder_browser_dialog & | show_new_folder_button (bool value) |
Sets a value indicating whether the New Folder button appears in the folder browser dialog box. | |
Public Methods | |
void | reset () noexcept override |
Resets all options to their default values, the last selected color to black, and the custom colors to their default values. | |
Protected Methods | |
bool | run_dialog (intptr owner) override |
When overridden in a derived class, specifies a common dialog box. | |
void | run_sheet (intptr owner) override |
When overridden in a derived class, specifies a common dialog box. | |
Additional Inherited Members | |
![]() | |
event< common_dialog, help_event_handler > | help_request |
Occurs when the user clicks the Help button on a common dialog box. | |
event< common_dialog, dialog_closed_event_handler > | dialog_closed |
Occurs when the user close a common dialog box with dialog close button or other dialog buttons. | |
![]() | |
common_dialog () | |
Initializes a new instance of the common_dialog class. | |
xtd::forms::dialog_result | dialog_result () const noexcept |
Gets async dialog_result result after dialog box is closing. | |
const xtd::any_object & | tag () const noexcept |
Gets an object that contains data about the control. | |
common_dialog & | tag (const xtd::any_object &tag) |
Sets an object that contains data about the control. | |
xtd::forms::dialog_result | show_dialog () |
Runs a common dialog box with a default owner. | |
xtd::forms::dialog_result | show_dialog (const iwin32_window &owner) |
Runs a common dialog box with the specified owner. | |
void | show_sheet (const iwin32_window &owner) |
Runs a common dialog box with the specified owner. | |
xtd::forms::dialog_result | show_sheet_dialog (const iwin32_window &owner) |
Runs a common dialog box with the specified owner. | |
![]() | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
virtual xtd::size | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. | |
template<class object_t > | |
xtd::uptr< object_t > | memberwise_clone () const |
Creates a shallow copy of the current object. | |
virtual xtd::string | to_string () const noexcept |
Returns a xtd::string that represents the current object. | |
![]() | |
template<class object_a_t , class object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
template<class object_a_t , class object_b_t > | |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
![]() | |
virtual void | on_dialog_closed (const dialog_closed_event_args &e) |
Raises the common_dialog::dialog_close event. | |
virtual void | on_help_request (help_event_args &e) |
Raises the common_dialog::help_request event. | |
void | set_dialog_result (xtd::forms::dialog_result value) |
Sets async dialog_result result after dialog box is closing. | |
![]() | |
component () | |
Initialises a new instance of the component class. | |
virtual bool | can_raise_events () const noexcept |
Gets a value indicating whether the component can raise an event. | |
bool | design_mode () const noexcept |
Gets a value that indicates whether the component is currently in design mode. | |
xtd::forms::folder_browser_dialog::folder_browser_dialog | ( | ) |
Initializes a new instance of the folder_browser_dialog class.
true
.
|
noexcept |
Gets a value that indicates whether the dialog will be automatically upgraded to enable new features.
true
if the the dialog will be automatically upgraded to enable new features; otherwise, false
. The default value is true
. folder_browser_dialog & xtd::forms::folder_browser_dialog::auto_upgrade_enable | ( | bool | value | ) |
Sets a value that indicates whether the dialog will be automatically upgraded to enable new features.
value | true if the the dialog will be automatically upgraded to enable new features; otherwise, false . The default value is true . |
|
noexcept |
Gets the descriptive text displayed above the tree view control in the dialog box.
folder_browser_dialog & xtd::forms::folder_browser_dialog::description | ( | const xtd::string & | value | ) |
Sets the descriptive text displayed above the tree view control in the dialog box.
value | The description to display. The default is an empty string (""). |
|
noexcept |
Gets the root folder where the browsing starts from.
folder_browser_dialog & xtd::forms::folder_browser_dialog::root_folder | ( | environment::special_folder | value | ) |
Sets the root folder where the browsing starts from.
value | One of the environment::special_folder values. The default is environment::special_folder::desktop. |
|
noexcept |
Gets the path selected by the user.
folder_browser_dialog & xtd::forms::folder_browser_dialog::selected_path | ( | const xtd::string & | value | ) |
Sets the path selected by the user.
value | The path of the folder first selected in the dialog box or the last folder selected by the user. The default is an empty string (""). |
|
noexcept |
Gets a value indicating whether the New Folder button appears in the folder browser dialog box.
true
if the New Folder button is shown in the dialog box; otherwise, false
. The default is true
. true
, the New Folder button is visible, giving the user a chance to create a folder. When the user clicks the New Folder button, a new folder is created and the user is prompted to specify the folder name. The selected node in the tree becomes the parent of the new folder. The actual caption of the New Folder button can vary depending upon the operating system folder_browser_dialog & xtd::forms::folder_browser_dialog::show_new_folder_button | ( | bool | value | ) |
Sets a value indicating whether the New Folder button appears in the folder browser dialog box.
value | true if the New Folder button is shown in the dialog box; otherwise, false . The default is true . |
true
, the New Folder button is visible, giving the user a chance to create a folder. When the user clicks the New Folder button, a new folder is created and the user is prompted to specify the folder name. The selected node in the tree becomes the parent of the new folder. The actual caption of the New Folder button can vary depending upon the operating system
|
overridevirtualnoexcept |
Resets all options to their default values, the last selected color to black, and the custom colors to their default values.
Implements xtd::forms::common_dialog.
|
overrideprotectedvirtual |
When overridden in a derived class, specifies a common dialog box.
owner | A value that represents the window handle of the owner window for the common dialog box. |
true
if the dialog box was successfully run; otherwise, false
. Implements xtd::forms::common_dialog.
|
overrideprotectedvirtual |
When overridden in a derived class, specifies a common dialog box.
owner | A value that represents the window handle of the owner window for the common dialog box. |
Implements xtd::forms::common_dialog.