FILE_SELECT_MENU
Creates a menu composed of selectable file names from a list of directories and subdirectories. Can be instantiated alone or within a POPUP_MENU or MENU_ITEM. The menu can store the selected file path and name into a string, and also exposes a read/write index parameter to set or get the selected item number in the flattened files list.
If the file path is set programmatically, the corresponding menu item is automatically selected (if found) and the index parameter is updated.
Attributes brief detailed show all inherited
Name | Description | Default | |||
---|---|---|---|---|---|
directories | List of directories to scan for files, separated by ';' | empty | |||
file_types | List of file extensions in wildcard syntax, separated by ';' | empty | |||
scan_on_load | When true, the menu is filled when created | true | |||
root_path | List of root directories that can be used to store relative file paths, separated by ';' | empty | |||
file_path_string_id | Identifier of the target string to store the selected file path (optional) | empty | |||
file_name_string_id | Identifier of the target string to store the selected file name for display purposes (optional) | empty | |||
Exposed Objects | |||||
Popup | Menu pops up at the current mouse location | ||||
Refresh | Refresh the content of the menu by re-scanning the file system | ||||
selected_file_index | The index of the selected item in the flattened files list (-1 if not available) | ||||
item_selected | Fired when the user selects an item in the menu |
See the POPUP_MENU when used as a popup menu, or the MENU_ITEM when used inside another menu (without the action_id attribute).
Specific Attributes