B4J Question Implementing jFX.DirectoryChooser

Discussion in 'B4J Questions' started by Fr Simon Rundell, Sep 13, 2018.

  1. Fr Simon Rundell

    Fr Simon Rundell Member Licensed User

    Hello, I need to implement a Directory Chooser, which appears to be a part of the jFX Library

    https://www.b4x.com/b4j/help/jfx.html#directorychooser

    Unfortunately, I can't seem to see it nor instantiate it. I realise I have missed soemthing really obvious, but I can't see it. I tried to force it with

    Code:
    Dim dlg As JFX.DirectoryChooser
    dlg.InitialDirectory=
    "C:\User\"
    dlg.Initialise
    txtSaveLocation.Text=dlg.Show(MainForm)
    but, obviously this was wrong.

    Thank you in anticipation.
     
  2. DonManfred

    DonManfred Expert Licensed User

    Try DirectoryChooser

    Code:
    Dim dirchoose As DirectoryChooser
        dirchoose.Initialize
        
    If InitialOpenPath = "" Or Not(File.Exists(File.GetFileParent(InitialOpenPath), "")) Then
            InitialOpenPath = 
    File.DirApp
        
    End If
        dirchoose.InitialDirectory = InitialOpenPath
        dirchoose.Title = 
    "Set Folder to bla bla bla"
        dirchoose.Show(MainForm)
     
    Erel and Fr Simon Rundell like this.
  3. Fr Simon Rundell

    Fr Simon Rundell Member Licensed User

    Yes, obvious now I see what you are doing. Thank you very much.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice