In traits.api File trait, how can I force the directory to be readonly?

63 Views Asked by At

I have a software that lets the user choose the database location from the traits.api File trait as shown below:

class DbPreferencesHelper(PreferencesHelper): dbLocation = File()

class DbPreferencesPane(PreferencesPane): view = View(Item('dbLocation', label='Location of database'))

The user can browse through directories and choose a file. I would like to restrict the directory the user can select a file from. Is there any way I can do that? If not, could I do it using pyface.api FileDialog?

Thank you.

0

There are 0 best solutions below