xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
folder_browser_dialog.cpp

The following code example demonstrate the use of folder_browser_dialog dialog.

Windows
folder_browser_dialog_w.png

folder_browser_dialog_wd.png
macOS
folder_browser_dialog_m.png

folder_browser_dialog_md.png
Gnome
folder_browser_dialog_g.png

folder_browser_dialog_gd.png
#include <xtd/xtd>
using namespace std;
using namespace xtd;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Folder browser dialog example");
controls().push_back(button1);
button1.location({10, 10});
button1.text("Folder...");
button1.click += [&] {
dialog.selected_path(selected_path);
selected_path = dialog.selected_path();
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());
}