In Tkinter, I am trying to make the askdirectory menu more user friendly. Is there a way to center the focus of the window on the last folder opened, both vertically and horizontally? I don't want my users to have to scroll right when they get deep into subfolders.

def action1():
    dirname = tkFileDialog.askdirectory(parent=master,initialdir='./',title='Please select Lot directory')
    global dirname  

Give starting directionary as initialdir passed to the function as parameter, return current directory as value from function and save in caller, no globals.


 def action1(i_directory):
     dirname = tkFileDialog.askdirectory(parent=master,initialdir=i_directory,title='Please select Lot directory')


Can someone please answer my question? How can i resize the Tkinter askdirectory window. to fit all the subdirectories i want to open without having to scroll. Im going through about 8 subfolders.