Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DirectoryChooser

[12:7] extends: FxObj

Wraps JavaFX DirectoryChooser, a dialog that lets the user browse the file system and select a directory. An optional title and initial directory can be set before the dialog is shown. Calling show() presents the native directory picker and returns the selected directory path, or null if the user cancels.

Methods

  • DirectoryChooser ()

    Creates a new DirectoryChooser.

  • setTitle (string Title)

    Sets the dialog title.

    • @p Title is a string with the title.
    • @r this object for chaining
  • setInitDir (string DirPath)

    Sets the initial directory.

    • @p DirPath is a string with the directory path.
    • @r this object for chaining
  • show (object MainStage)

    Shows the directory chooser dialog.

    • @p MainStage is the owner fxApp stage.
    • @r The selected File object or null.