tkchooseDirectory opens dialog below browser window

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

tkchooseDirectory opens dialog below browser window

This post has NOT been accepted by the mailing list yet.
Dear all,

I'm using the tkchooseDirectory in a Shiny application to select a folder for importing a data file (on a windows 8 PC). This works fine, except that the popup dialog for selecting the folder appears below the browser window, or below the R studio window if run from there. The dialog does not appear as an icon on the taskbar, so I have to minimize whatever windows it hides behind before I can access it. Is there any way to make sure it pops up on top?

(I tried choose.dir, but it does the same thing.)

Thanks in advance,



  condition = "output.idEntered",
  directoryInput('directory', label = 'Select data folder')


    ignoreNULL = TRUE,
    eventExpr = {
    handlerExpr = {
      if (input$directory > 0) {
        # condition prevents handler execution on initial app launch
        # launch the directory selection dialog with initial path read from the widget
        path = tclvalue(tkchooseDirectory())
        # update the widget value
        updateDirectoryInput(session, 'directory', value = path)