Function file_chooser
pub fn file_chooser<P>(
message: &str,
pattern: &str,
dir: P,
relative: bool,
) -> Option<String> ⓘ
Available on crate feature
dep_fltk
only.Expand description
Shows a file chooser returning a String.
The pattern field takes the same argument the FileChooser::set_filter
method.
Example:
use fltk::{prelude::*, *};
fn main() {
let app = app::App::default();
let mut win = window::Window::default().with_size(900, 300);
let file = dialog::file_chooser("Choose File", "*.rs", ".", true).unwrap();
println!("{}", file);
win.end();
win.show();
app.run().unwrap();
}