Reputation: 91
I'm writing a Desktop App in kivy, and I am trying to open a FileBrowser/FileChooser in order to retrieve the path of a given directory. However, it seems like the default behavior of both widgets doesn't allow for it. When you click (once) on a directory, it navigates inside of it instead of selecting it. Is it possible to change that default behavior such that in order to navigate inside a directory, you have to double-click instead, and use a single-click to select the directory? I figure I can make my own FileBrowser, inheriting form the existing one in the kivy garden, and modify just what I want, but I'm not very experienced with understanding kivy implementation yet...
Upvotes: 2
Views: 2633
Reputation: 91
Peeking into the source code, there is an option called 'dirselect' that is 'False' by default. Just set it to 'True'.
kv language example:
FileBrowser:
id: _filebrowser
dirselect: True
Upvotes: 5