I am trying to create a button that uses SystemDialogInput["FileOpen"]
to browse for a file and assigns the file name to a variable.
For example:
{Button["Select the file", fname = SystemDialogInput["FileOpen"]], Dynamic[fname]}
This works most of the time; however, when the file that I browse to is several nested folders away from the default directory, it does not update the value of fname.
Is there some way around this? Or is there a better function to use? I eventually would like to use this button within Manipulate
.
Method->"Queued"
to yourButton
. $\endgroup$