good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: Directory and file selection with PERL/Tkby elef (Friar) |
on Mar 20, 2012 at 09:22 UTC ( [id://960552]=note: print w/replies, xml ) | Need Help?? |
I've been using getOpenFile and I like it a lot... now I need something like getOpenFile for folder selection. I could only find chooseDirectory, which is simple to use and works OK, but it doesn't look like the native folder picker in Windows, and it's not exactly intuitive for the user. It took me 10 minutes to figure out how to create a new folder at the desired location instead of picking an existing one. (You need to overtype the name of the lowest-level folder 'existing_folder' in the entry box; if you type existing_folder/newfolder in the box, it returns the path existing_folder/existing_folder/newfolder. You also have to add your own code for creating the new folder.) Anyone know of a better solution? Sample chooseDirectory code for reference:
I tried FileDialog as well, and got this bug: http://www.perlmonks.org/?node_id=646083 It would seem that FileDialog is buggy, and the best option is chooseDirectory... I can live with that, but it really needs a "Create new folder" button to be perfect.
In Section
Seekers of Perl Wisdom
|
|