I tested your code and I see the problem. I can use the GUI to get to some directory, but in order to make a new directory, I have to append the name in your "Directory Name box" with "\newdirname", then yes that directory gets made after "Go". Of course the problem is that the GUI user doesn't see that as an obvious possibility. I just instinctively tried it, but I'm not your average GUI user.
Really what is needed is something like the getOpenFile() dialog, which I demo'd at Re: select input file from windows explorer. Amazing enough that open file dialog will allow a new directory to be created in the "windows way"! Unfortunately this thing wants a file name and won't settle for just creating the directory.
I think you are going to be stuck with having to create some more buttons and dialog about making a new directory in your Tk code. I see what you want, but I don't see any easy way to get there.
Update:
The problem is that you are asking about a directory instead of a path to a file.
Windows app programs don't ask, "give me a directory", they want a path to a specific file.
A Windows app asks where to to save/get a file. Creating a dir, with no target file is rather strange.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.