Category: BGI GUI
Syntax:
bgiOpenFileDialog:String(title:String, defaultPath:String, window:Int)
String
Displays a Windows Open File dialog and returns the selected file path.
Takes title (String), defaultPath (String), and window (Int).
Returns full path as string.
View detailed documentation online
;No example implemented yet
Returns at once, because a browser can't wait for an answer. The answer arrives as an event: BGI_EVENT_COMMAND_CLICK with ID BGI_EVENT_ID_FILEDIALOG ($115), source = the window, bgiGetEventData() = 1 for OK or 0 for Cancel, bgiGetEventExtra() = the file name. It uses the browser's own file picker and copies the chosen file into the web file store under its name, so the file functions can read it. Open it from a button or menu handler: browsers only show a file picker straight after a click or key press. defaultPath isn't used. See BGI on the web.
BambooBasic © 2026 Michael Denathorn