Skip to content

ui::PickFolderOptions

Header: winui/ui/Pickers.hpp.

What pick_folder() and pick_folders() are asked for. Every field is optional.

Example:

if (auto folder = ui::pick_folder(window, {.title = "Choose a library"}))
{
    window.set_title(ui::path_to_utf8(folder->filename()));
}

Field Type Default
title std::string The dialog caption; empty keeps the default.
commit_button_text std::string The Select button's label; empty keeps the default.
start_location PickerLocation PickerLocation::Unspecified The known folder to open in when folder is empty.
folder std::filesystem::path The folder to open in, if it exists; absolute. Wins over start_location.
remember_last bool true True: folder (or start_location) opens the first time, and after that the dialog reopens wherever the user last picked from. False: it opens every time.